Skip to main content

Order

Set the order for flex & grid items.

View as Markdown
baselinewidely

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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

Negative

Put a minus after the colon to negate a value.

or:-4A minus after the colon.