Skip to main content

Flex Grow

Set how flex items grow to fill available space.

View as Markdown
baselinewidely
ClassCSS
fg:0flex-grow: 0;
fg:1flex-grow: 1;
fg:2flex-grow: 2;
fg:3flex-grow: 3;
fg:4flex-grow: 4;
fg:5flex-grow: 5;
fg:6flex-grow: 6;
fg:7flex-grow: 7;
fg:8flex-grow: 8;

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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