Skip to main content

Height

Set the height for an element.

View as Markdown
baselinewidely

The same values work with max-h & min-h, as in min-h:4.

Variants

Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:h:4.

Breakpoints

Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.

@xs:h:4From 32rem up.
@sm:h:4From 40rem up.
@md:h:4From 48rem up.
@lg:h:4From 64rem up.
@xl:h:4From 80rem up.
@xxl:h:4From 96rem up.

Containers

Apply a class from a container's width up, not the viewport's. Mark the parent with ct:is first.

@c:xs:h:4Container from 32rem up.
@c:sm:h:4Container from 40rem up.
@c:md:h:4Container from 48rem up.
@c:lg:h:4Container from 64rem up.
@c:xl:h:4Container from 80rem up.
@c:xxl:h:4Container from 96rem up.

Media

Apply a class when the device or the page matches a condition, or on the first frame an element renders.

@pc:h:4On a touch screen.
@prm:h:4With reduced motion on.
@st:h:4On the first frame.

States

Apply a class only while the element is in a state, such as hovered, focused or checked.

h:h:4On :hover.
f:h:4On :focus.
fv:h:4On :focus-visible.
a:h:4On :active.
d:h:4On :disabled.
fc:h:4On :first-child.
c:h:4On :checked.
e:h:4On :empty.
fw:h:4On :focus-within.
i:h:4On :invalid.
in:h:4On :indeterminate.
lc:h:4On :last-child.
nc:h:4On :nth-child.
r:h:4On :required.
ro:h:4On :read-only.
v:h:4On :valid.

Pseudo Elements

Style a part of the element rather than the element itself, such as its placeholder or the selected text.

a::h:4On ::after.
b::h:4On ::before.
p::h:4On ::placeholder.
s::h:4On ::selection.