Skip to main content

Outline Offset

Set the offset for an element's outline.

View as Markdown
baselinewidely
ClassCSS
oo:0outline-offset: 0;
oo:1outline-offset: 1px;
oo:2outline-offset: 2px;
oo:3outline-offset: 3px;
oo:4outline-offset: 4px;

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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

Negative

Put a minus after the colon to negate a value.

oo:-4A minus after the colon.