Skip to main content

Display

Set the display box type of an element.

View as Markdown
baselinewidely

Variants

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

Breakpoints

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

@xs:d:igFrom 32rem up.
@sm:d:igFrom 40rem up.
@md:d:igFrom 48rem up.
@lg:d:igFrom 64rem up.
@xl:d:igFrom 80rem up.
@xxl:d:igFrom 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:d:igContainer from 32rem up.
@c:sm:d:igContainer from 40rem up.
@c:md:d:igContainer from 48rem up.
@c:lg:d:igContainer from 64rem up.
@c:xl:d:igContainer from 80rem up.
@c:xxl:d:igContainer 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:d:igOn a touch screen.
@prm:d:igWith reduced motion on.
@st:d:igOn the first frame.

States

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

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

Pseudo Elements

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

a::d:igOn ::after.
b::d:igOn ::before.
p::d:igOn ::placeholder.
s::d:igOn ::selection.