Skip to main content

Resize

Set how an element can be resized.

View as Markdown
baselinelimited
ClassCSS
r:bresize: both;
r:hresize: horizontal;
r:noneresize: none;
r:vresize: vertical;

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

a::r:noneOn ::after.
b::r:noneOn ::before.
p::r:noneOn ::placeholder.
s::r:noneOn ::selection.