Skip to main content

Grid Template Rows

Set the rows for 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:gtr:4.

Breakpoints

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

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

States

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

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

Pseudo Elements

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

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