Skip to main content

Flex Wrap

Set how flex items wrap in a container.

View as Markdown
baselinewidely
ClassCSS
fw:nwflex-wrap: nowrap;
fw:wflex-wrap: wrap;
fw:wrflex-wrap: wrap-reverse;

Variants

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

Breakpoints

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

@xs:fw:wFrom 32rem up.
@sm:fw:wFrom 40rem up.
@md:fw:wFrom 48rem up.
@lg:fw:wFrom 64rem up.
@xl:fw:wFrom 80rem up.
@xxl:fw:wFrom 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:fw:wContainer from 32rem up.
@c:sm:fw:wContainer from 40rem up.
@c:md:fw:wContainer from 48rem up.
@c:lg:fw:wContainer from 64rem up.
@c:xl:fw:wContainer from 80rem up.
@c:xxl:fw:wContainer 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:fw:wOn a touch screen.
@prm:fw:wWith reduced motion on.
@st:fw:wOn the first frame.

States

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

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

Pseudo Elements

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

a::fw:wOn ::after.
b::fw:wOn ::before.
p::fw:wOn ::placeholder.
s::fw:wOn ::selection.