Skip to main content

Right

Set the right 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:r:4.

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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

Negative

Put a minus after the colon to negate a value.

r:-4A minus after the colon.