The .max-h
class is flagged as a value-driven selector.
The variable --max-h is required.
<element class="max-h" style="--max-h: /* value */;" />
Responsive
Prefix
.max-h
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h" style="--md-max-h: /* value */;" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
<element class="content-before max-h::before" style="--max-h-before: /* value */;" /><element class="content-after max-h::after" style="--max-h-after: /* value */;" />
Shorthand
Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime
processes this for you. Unlike :hover that is
generating CSS on the fly, shorthand only splits it
and appends the corresponding style.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.max-h
Sets max-height via --max-h.
[max-h]
Caps height using raw --max-h. Useful for responsive size constraints.
CSS Rules
.\[max-h\] { max-height: var(--max-h);}
Usage
The .[max-h]
class is flagged as a value-driven selector.
The variable --max-h is required.
<element class="[max-h]" style="--max-h: /* value */;" />
Responsive
Prefix
.[max-h]
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:[max-h]" style="--md-max-h: /* value */;" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
<element class="content-before [max-h]::before" style="--max-h-before: /* value */;" /><element class="content-after [max-h]::after" style="--max-h-after: /* value */;" />
Shorthand
Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime
processes this for you. Unlike :hover that is
generating CSS on the fly, shorthand only splits it
and appends the corresponding style.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.[max-h]
Caps height using raw --max-h. Useful for responsive size constraints.
max-h-none
Removes any max-height constraint by setting it to none.
CSS Rules
.max-h-none { max-height: none;}
Usage
<element class="max-h-none" />
Responsive
Prefix
.max-h-none
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-none" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Removes any max-height constraint by setting it to none.
max-h-full
Caps max-height at 100% of the containing block.
CSS Rules
.max-h-full { max-height: 100%;}
Usage
<element class="max-h-full" />
Responsive
Prefix
.max-h-full
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-full" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Prefix
.max-h-screen
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-screen" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the dynamic viewport height (100dvh).
CSS Rules
.max-h-dvh { max-height: 100dvh;}
Usage
<element class="max-h-dvh" />
Responsive
Prefix
.max-h-dvh
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-dvh" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the dynamic viewport height (100dvh).
max-h-dvw
Caps max-height at 100% of the dynamic viewport width (100dvw).
CSS Rules
.max-h-dvw { max-height: 100dvw;}
Usage
<element class="max-h-dvw" />
Responsive
Prefix
.max-h-dvw
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-dvw" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the dynamic viewport width (100dvw).
max-h-lvh
Caps max-height at 100% of the large viewport height (100lvh).
CSS Rules
.max-h-lvh { max-height: 100lvh;}
Usage
<element class="max-h-lvh" />
Responsive
Prefix
.max-h-lvh
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-lvh" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the large viewport height (100lvh).
max-h-lvw
Caps max-height at 100% of the large viewport width (100lvw).
CSS Rules
.max-h-lvw { max-height: 100lvw;}
Usage
<element class="max-h-lvw" />
Responsive
Prefix
.max-h-lvw
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-lvw" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the large viewport width (100lvw).
max-h-svh
Caps max-height at 100% of the small viewport height (100svh).
CSS Rules
.max-h-svh { max-height: 100svh;}
Usage
<element class="max-h-svh" />
Responsive
Prefix
.max-h-svh
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-svh" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the small viewport height (100svh).
max-h-svw
Caps max-height at 100% of the small viewport width (100svw).
CSS Rules
.max-h-svw { max-height: 100svw;}
Usage
<element class="max-h-svw" />
Responsive
Prefix
.max-h-svw
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-svw" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at 100% of the small viewport width (100svw).
max-h-min
Caps max-height at the intrinsic min-content size of the element.
CSS Rules
.max-h-min { max-height: min-content;}
Usage
<element class="max-h-min" />
Responsive
Prefix
.max-h-min
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-min" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at the intrinsic min-content size of the element.
max-h-max
Caps max-height at the intrinsic max-content size of the element.
CSS Rules
.max-h-max { max-height: max-content;}
Usage
<element class="max-h-max" />
Responsive
Prefix
.max-h-max
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-max" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at the intrinsic max-content size of the element.
max-h-fit
Caps max-height at fit-content, based on the element's content within constraints.
CSS Rules
.max-h-fit { max-height: fit-content;}
Usage
<element class="max-h-fit" />
Responsive
Prefix
.max-h-fit
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-fit" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Caps max-height at fit-content, based on the element's content within constraints.
max-h-lh
Caps max-height at one line-height unit (1lh).
CSS Rules
.max-h-lh { max-height: 1lh;}
Usage
<element class="max-h-lh" />
Responsive
Prefix
.max-h-lh
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:max-h-lh" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.