Skip to main content

Column Gap

Set the spacing between columns in a grid layout.

View as Markdown
baselinewidely

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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