Skip to main content

Scale

Set the scale for an element.

View as Markdown
baselinewidely

The same values work with sx & sy, as in sy:20.

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

a::s:50On ::after.
b::s:50On ::before.
p::s:50On ::placeholder.
s::s:50On ::selection.

Negative

Put a minus after the colon to negate a value.

s:-5A minus after the colon.