Skip to main content

Justify Items

Set item alignment along a container's inline axis.

View as Markdown
baselinewidely
ClassCSS
ji:cjustify-items: center;
ji:ejustify-items: end;
ji:sjustify-items: start;
ji:stjustify-items: stretch;

Variants

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

Breakpoints

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

@xs:ji:sFrom 32rem up.
@sm:ji:sFrom 40rem up.
@md:ji:sFrom 48rem up.
@lg:ji:sFrom 64rem up.
@xl:ji:sFrom 80rem up.
@xxl:ji:sFrom 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:ji:sContainer from 32rem up.
@c:sm:ji:sContainer from 40rem up.
@c:md:ji:sContainer from 48rem up.
@c:lg:ji:sContainer from 64rem up.
@c:xl:ji:sContainer from 80rem up.
@c:xxl:ji:sContainer 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:ji:sOn a touch screen.
@prm:ji:sWith reduced motion on.
@st:ji:sOn the first frame.

States

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

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

Pseudo Elements

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

a::ji:sOn ::after.
b::ji:sOn ::before.
p::ji:sOn ::placeholder.
s::ji:sOn ::selection.