BlogPlaygroundOne

Sizing

Sizing utility classes are used to modify the dimensions of an element.

Edit this page
Report a Bug
Copy Page as Markdown
ClassDescription
h-autoheight: auto
h-screenheight: 100vh
h-0height: 0
h-25height: 25%
h-50height: 50%
h-75height: 75%
h-100height: 100%
fill-heightheight: 100%
height-screenheight: 100dvh
w-autowidth: auto
w-0width: 0
w-33width: 33%
w-25width: 25%
w-50width: 50%
w-66width: 66%
w-75width: 75%
w-100width: 100%

Usage

The sizing utility classes allow you to quickly style the dimensions of any element. These classes can be used to apply the height and width properties to an element.

Height

Specify the height property of block level elements with a utility class. The following classes are applied using the format .{prefix}-{size} ; where prefix is h and size is the value.

.h-25
.h-50
.h-75
.h-100

Width

Specify the width property of block level elements with a utility class. The following classes are applied using the format .{prefix}-{size} ; where prefix is w and size is the value.

| Class | Description |

.w-25
.w-33
.w-50
.w-66
.w-75
.w-100

SASS Variables

You can also use the following SASS variables to customize the generated height and width classes:

src/styles/settings.scss
@use 'vuetify/settings' with (
  $utilities: (
    "fill-height": (
      property: height,
      class: fill,
      values: (
        height: 100%
      )
    ),
    "height": (
      property: height,
      responsive: true,
      class: h,
      values: (
        auto: auto,
        screen: 100vh,
        0: 0,
        25: 25%,
        50: 50%,
        75: 75%,
        100: 100%
      )
    ),
    "height-screen": (
      property: height,
      class: h,
      values: (
        screen: 100dvh
      )
    ),
    "width": (
      property: width,
      responsive: true,
      class: w,
      values: (
        auto: auto,
        0: 0,
        25: 25%,
        33: 33%,
        50: 50%,
        66: 66%,
        75: 75%,
        100: 100%
      )
    )
  )
);

Disable height/width class generation by setting the the fill-height, height, height-screen, and, width variables to false.

src/styles/settings.scss
@use 'vuetify/settings' with (
  $utilities: (
    "fill-height": false,
    "height": false,
    "height-screen": false,
    "width": false
  )
);

Ready for more?

Continue your learning with related content selected by the Team or move between pages by using the navigation links below.