Skip to main content

Color

Set the text color for 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:c:indigo-8.

Breakpoints

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

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

States

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

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

Pseudo Elements

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

a::c:indigo-8On ::after.
b::c:indigo-8On ::before.
p::c:indigo-8On ::placeholder.
s::c:indigo-8On ::selection.

Opacity

Add a slash & a step after a color to set its opacity.

c:indigo-8/50At 50% opacity, in steps of 5.