Skip to main content

Top

Set the top placement of positioned elements.

View as Markdown
baselinewidely

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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

Negative

Put a minus after the colon to negate a value.

t:-4A minus after the colon.