Skip to main content

Overflow

Set how content overflows its container.

View as Markdown
baselinewidely
ClassCSS
o:autooverflow: auto;
o:coverflow: clip;
o:hoverflow: hidden;
o:soverflow: scroll;
o:voverflow: visible;

The same values work with ox & oy, as in oy:v.

Variants

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

Breakpoints

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

@xs:o:hFrom 32rem up.
@sm:o:hFrom 40rem up.
@md:o:hFrom 48rem up.
@lg:o:hFrom 64rem up.
@xl:o:hFrom 80rem up.
@xxl:o:hFrom 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:o:hContainer from 32rem up.
@c:sm:o:hContainer from 40rem up.
@c:md:o:hContainer from 48rem up.
@c:lg:o:hContainer from 64rem up.
@c:xl:o:hContainer from 80rem up.
@c:xxl:o:hContainer 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:o:hOn a touch screen.
@prm:o:hWith reduced motion on.
@st:o:hOn the first frame.

States

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

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

Pseudo Elements

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

a::o:hOn ::after.
b::o:hOn ::before.
p::o:hOn ::placeholder.
s::o:hOn ::selection.