Skip to main content

Inline Size

Set an element's logical inline size.

View as Markdown
baselinewidely

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

Variants

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

Breakpoints

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

@xs:xs:4From 32rem up.
@sm:xs:4From 40rem up.
@md:xs:4From 48rem up.
@lg:xs:4From 64rem up.
@xl:xs:4From 80rem up.
@xxl:xs: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:xs:4Container from 32rem up.
@c:sm:xs:4Container from 40rem up.
@c:md:xs:4Container from 48rem up.
@c:lg:xs:4Container from 64rem up.
@c:xl:xs:4Container from 80rem up.
@c:xxl:xs: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:xs:4On a touch screen.
@prm:xs:4With reduced motion on.
@st:xs:4On the first frame.

States

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

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

Pseudo Elements

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

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