Skip to main content

Block Size

Set an element's logical block size.

View as Markdown
baselinewidely

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

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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