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:95.

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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

Negative

Put a minus after the colon to negate a value.

s:-5A minus after the colon.