The width utilities provide a set of classes to adjust the width, max-width, and min-width properties of elements.
| Class Name | Property | Value |
|---|---|---|
.w-auto | width | auto |
.w-fit-content | width | fit-content |
.w-max-content | width | max-content |
.w-min-content | width | min-content |
.w-stretch | width | stretch |
.w-full | width | 100% |
.w-quarter | width | 25% |
.w-half | width | 50% |
.w-three-quarters | width | 75% |
.w-third | width | calc(100%/ 3) |
.w-two-thirds | width | calc(100%/ 1.5) |
.w-half-screen | width | 50vw |
.w-third-screen | width | calc(100vw/ 3) |
.w-two-thirds-screen | width | calc(100vw/ 1.5) |
.w-quarter-screen | width | 25vw |
.w-three-quarters-screen | width | 75vw |
.w-full-screen | width | 100vw |
.w-0 | width | var(--graupl-spacer-0) |
.w-1 | width | var(--graupl-spacer-1) |
.w-2 | width | var(--graupl-spacer-2) |
.w-3 | width | var(--graupl-spacer-3) |
.w-4 | width | var(--graupl-spacer-4) |
.w-5 | width | var(--graupl-spacer-5) |
.w-6 | width | var(--graupl-spacer-6) |
.w-7 | width | var(--graupl-spacer-7) |
.w-8 | width | var(--graupl-spacer-8) |
.w-9 | width | var(--graupl-spacer-9) |
.w-10 | width | var(--graupl-spacer-10) |
| Class Name | Property | Value |
|---|---|---|
.max-w-auto | max-width | auto |
.max-w-fit-content | max-width | fit-content |
.max-w-max-content | max-width | max-content |
.max-w-min-content | max-width | min-content |
.max-w-stretch | max-width | stretch |
.max-w-full | max-width | 100% |
.max-w-quarter | max-width | 25% |
.max-w-half | max-width | 50% |
.max-w-three-quarters | max-width | 75% |
.max-w-third | max-width | calc(100%/ 3) |
.max-w-two-thirds | max-width | calc(100%/ 1.5) |
.max-w-half-screen | max-width | 50vw |
.max-w-third-screen | max-width | calc(100vw/ 3) |
.max-w-two-thirds-screen | max-width | calc(100vw/ 1.5) |
.max-w-quarter-screen | max-width | 25vw |
.max-w-three-quarters-screen | max-width | 75vw |
.max-w-full-screen | max-width | 100vw |
.max-w-0 | max-width | var(--graupl-spacer-0) |
.max-w-1 | max-width | var(--graupl-spacer-1) |
.max-w-2 | max-width | var(--graupl-spacer-2) |
.max-w-3 | max-width | var(--graupl-spacer-3) |
.max-w-4 | max-width | var(--graupl-spacer-4) |
.max-w-5 | max-width | var(--graupl-spacer-5) |
.max-w-6 | max-width | var(--graupl-spacer-6) |
.max-w-7 | max-width | var(--graupl-spacer-7) |
.max-w-8 | max-width | var(--graupl-spacer-8) |
.max-w-9 | max-width | var(--graupl-spacer-9) |
.max-w-10 | max-width | var(--graupl-spacer-10) |
| Class Name | Property | Value |
|---|---|---|
.min-w-auto | min-width | auto |
.min-w-fit-content | min-width | fit-content |
.min-w-max-content | min-width | max-content |
.min-w-min-content | min-width | min-content |
.min-w-stretch | min-width | stretch |
.min-w-full | min-width | 100% |
.min-w-quarter | min-width | 25% |
.min-w-half | min-width | 50% |
.min-w-three-quarters | min-width | 75% |
.min-w-third | min-width | calc(100%/ 3) |
.min-w-two-thirds | min-width | calc(100%/ 1.5) |
.min-w-half-screen | min-width | 50vw |
.min-w-third-screen | min-width | calc(100vw/ 3) |
.min-w-two-thirds-screen | min-width | calc(100vw/ 1.5) |
.min-w-quarter-screen | min-width | 25vw |
.min-w-three-quarters-screen | min-width | 75vw |
.min-w-full-screen | min-width | 100vw |
.min-w-0 | min-width | var(--graupl-spacer-0) |
.min-w-1 | min-width | var(--graupl-spacer-1) |
.min-w-2 | min-width | var(--graupl-spacer-2) |
.min-w-3 | min-width | var(--graupl-spacer-3) |
.min-w-4 | min-width | var(--graupl-spacer-4) |
.min-w-5 | min-width | var(--graupl-spacer-5) |
.min-w-6 | min-width | var(--graupl-spacer-6) |
.min-w-7 | min-width | var(--graupl-spacer-7) |
.min-w-8 | min-width | var(--graupl-spacer-8) |
.min-w-9 | min-width | var(--graupl-spacer-9) |
.min-w-10 | min-width | var(--graupl-spacer-10) |
To customize the alignment utilities, you can use the following variables.
| Variable | Description | Default Value |
|---|---|---|
$selector-base | Base selector for utility classes. | "." |
$selector-prefix | The selector prefix for all utility classes. | "" |
$selector-suffix | The selctor suffix for all utility classes. | "" |
$selector-separator | The selector separator for all utility classes. | "" |
$use-important | Appends !important to generated utility declarations. | true |
$generate-base-utilities | Generates the base utility classes. | true |
$screen-aware | Enables screen-aware utility variants. | false |
$theme-aware | Enables theme-aware utility variants. | false |
$scheme-aware | Enables scheme-aware utility variants. | false |
$state-aware | Enables state-aware utility variants. | false |
$container-aware | Enables container-aware utility variants. | false |
$screen-aware-selector-prefix | Prefix to the screen-aware portion of utility selectors. | "" |
$screen-aware-selector-suffix | Suffix to the screen-aware portion of utility selectors. | "" |
$screen-aware-selector-separator | Separator inserted for screen-aware utility selectors. | "\\:" |
$theme-aware-selector-prefix | Prefix to the theme-aware portion of utility selectors. | "" |
$theme-aware-selector-suffix | Suffix to the theme-aware portion of utility selectors. | "-theme" |
$theme-aware-selector-separator | Separator inserted for theme-aware utility selectors. | "\\:" |
$scheme-aware-selector-prefix | Prefix to the scheme-aware portion of utility selectors. | "" |
$scheme-aware-selector-suffix | Suffix to the scheme-aware portion of utility selectors. | "-mode" |
$scheme-aware-selector-separator | Separator inserted for scheme-aware utility selectors. | "\\:" |
$state-aware-selector-prefix | Prefix to the state-aware portion of utility selectors. | "" |
$state-aware-selector-suffix | Suffix to the state-aware portion of utility selectors. | "" |
$state-aware-selector-separator | Separator inserted for state-aware utility selectors. | "\\:" |
$container-aware-selector-prefix | Prefix to the container-aware portion of utility selectors. | "cq\\:" |
$container-aware-selector-suffix | Suffix to the container-aware portion of utility selectors. | "" |
$container-aware-selector-separator | Separator inserted for container-aware utility selectors. | "\\:" |
$utility-properties | Map of utility properties. | () |
$utility-values | Map of utility values. | () |
$utility-map | Map of utility property/value pairs. | () |
Generating responsive utility classes can be done by setting $screen-aware, $theme-aware, $scheme-aware, $state-aware, or $container-aware to true.
By default, no responsive utility classes are generated for width.
✏️ Note
For more information on responsive variants, refer to the Responsive utility classes documentation.