Skip to main content

Font Weight

Set the font weight for an element.

View as Markdown
baselinewidely
ClassCSS
fw:100font-weight: 100;
fw:200font-weight: 200;
fw:300font-weight: 300;
fw:400font-weight: 400;
fw:500font-weight: 500;
fw:600font-weight: 600;
fw:700font-weight: 700;
fw:800font-weight: 800;
fw:900font-weight: 900;

Variants

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

Breakpoints

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

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

States

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

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

Pseudo Elements

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

a::fw:500On ::after.
b::fw:500On ::before.
p::fw:500On ::placeholder.
s::fw:500On ::selection.