Skip to main content

Place Content

Set the content justification & alignment simultaneously.

View as Markdown
baselinewidely
ClassCSS
pc:bsplace-content: baseline start;
pc:cplace-content: center;
pc:eplace-content: end;
pc:splace-content: start;
pc:saplace-content: space-around;
pc:sbplace-content: space-between;
pc:seplace-content: space-evenly;
pc:ssplace-content: stretch stretch;

Variants

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

Breakpoints

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

@xs:pc:saFrom 32rem up.
@sm:pc:saFrom 40rem up.
@md:pc:saFrom 48rem up.
@lg:pc:saFrom 64rem up.
@xl:pc:saFrom 80rem up.
@xxl:pc:saFrom 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:pc:saContainer from 32rem up.
@c:sm:pc:saContainer from 40rem up.
@c:md:pc:saContainer from 48rem up.
@c:lg:pc:saContainer from 64rem up.
@c:xl:pc:saContainer from 80rem up.
@c:xxl:pc:saContainer 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:pc:saOn a touch screen.
@prm:pc:saWith reduced motion on.
@st:pc:saOn the first frame.

States

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

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

Pseudo Elements

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

a::pc:saOn ::after.
b::pc:saOn ::before.
p::pc:saOn ::placeholder.
s::pc:saOn ::selection.