Skip to main content

Overscroll Behavior

Set the browser's scroll overflow behavior.

View as Markdown
baselinelimited
ClassCSS
ob:autooverscroll-behavior: auto;
ob:coverscroll-behavior: contain;
ob:noneoverscroll-behavior: none;

The same values work with obb, obi, obx & oby, as in oby:none.

Variants

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

Breakpoints

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

@xs:ob:cFrom 32rem up.
@sm:ob:cFrom 40rem up.
@md:ob:cFrom 48rem up.
@lg:ob:cFrom 64rem up.
@xl:ob:cFrom 80rem up.
@xxl:ob:cFrom 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:ob:cContainer from 32rem up.
@c:sm:ob:cContainer from 40rem up.
@c:md:ob:cContainer from 48rem up.
@c:lg:ob:cContainer from 64rem up.
@c:xl:ob:cContainer from 80rem up.
@c:xxl:ob:cContainer 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:ob:cOn a touch screen.
@prm:ob:cWith reduced motion on.
@st:ob:cOn the first frame.

States

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

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

Pseudo Elements

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

a::ob:cOn ::after.
b::ob:cOn ::before.
p::ob:cOn ::placeholder.
s::ob:cOn ::selection.