Skip to main content

Object Position

Set how to position the container's content.

View as Markdown
baselinewidely
ClassCSS
op:bobject-position: bottom;
op:cobject-position: center;
op:lobject-position: left;
op:lbobject-position: left bottom;
op:ltobject-position: left top;
op:robject-position: right;
op:rbobject-position: right bottom;
op:rtobject-position: right top;
op:tobject-position: top;

Variants

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

Breakpoints

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

@xs:op:ltFrom 32rem up.
@sm:op:ltFrom 40rem up.
@md:op:ltFrom 48rem up.
@lg:op:ltFrom 64rem up.
@xl:op:ltFrom 80rem up.
@xxl:op:ltFrom 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:op:ltContainer from 32rem up.
@c:sm:op:ltContainer from 40rem up.
@c:md:op:ltContainer from 48rem up.
@c:lg:op:ltContainer from 64rem up.
@c:xl:op:ltContainer from 80rem up.
@c:xxl:op:ltContainer 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:op:ltOn a touch screen.
@prm:op:ltWith reduced motion on.
@st:op:ltOn the first frame.

States

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

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

Pseudo Elements

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

a::op:ltOn ::after.
b::op:ltOn ::before.
p::op:ltOn ::placeholder.
s::op:ltOn ::selection.