Skip to content

Text

Body and footnote in paragraphs, the weight and colours running text takes, and what the item sets on the page for all of it.

Running text is two roles. Body is the default: the page is set in it, and text with no class is body text. Footnote is the step below it.

Body is the size of the interface. A row, a field, a menu and a paragraph are all set in it, so a screen reads in one voice and a table lines up with the form beside it. On a phone it grows to a size a thumb can aim at, and a field can be typed in without the browser zooming in on it.

BodyRows, fields, menus and paragraphs. The page is set in it unless a class says otherwise.
PropertyDesktopPhone
Size--type-body
14px0.875rem
16px1rem
Line height--type-body-leading
20pxcalc(20 / 14)
22pxcalc(22 / 16)
Tracking
None
None
Weight
400
400

Footnote is a step down for the second line: the description under a title, the note beside a value, the detail a reader wants after the main thing. It keeps the body's rhythm at a smaller size, and it grows on a phone as the body does.

FootnoteSecondary lines and descriptions.
PropertyDesktopPhone
Size--type-footnote
13px0.8125rem
14px0.875rem
Line height--type-footnote-leading
18pxcalc(18 / 13)
20pxcalc(20 / 14)
Tracking
None
None
Weight
400
400

The values in full colour are the ones that apply at this width. The phone values apply where (max-width: 767px) matches.

Emphasis

Text is regular. Medium is the one step of emphasis, for a term being defined or a value that matters more than its label. Nothing is heavier than medium: Font families shows what the bolder classes come to.

Colour

Text takes three colours, in the order a reader should meet them.

  • The first thing to read: a title, a value, the text of a paragraph.

    text-foreground--foreground

  • The second thing: a description, a label beside its value, a table's header.

    text-muted-foreground--muted-foreground

  • The third thing: a placeholder, a timestamp, a mark in the margin.

    text-subtle-foreground--subtle-foreground

Each is worked out against the page from the item's values, in both themes.

PairLightDark
--foregroundon--background
17.5:1
16.1:1
--muted-foregroundon--background
6.4:1
7.4:1
--subtle-foregroundon--background
4.9:1
5.4:1

What the page sets

The item sets these on body, and all running text inherits them.

font-size
var(--type-body)The body role, so text with no class is body text.
line-height
var(--type-body-leading)The body role's line height.
font-weight
400Regular, unless a class or a role says medium.
font-variant-numeric
tabular-numsFigures share one width, so amounts and dates line up in a column.
overflow-wrap
break-wordA long address or identifier breaks and stays inside its box.
text-underline-position
from-fontAn underline sits where the font puts it.
text-decoration-skip-ink
autoAn underline steps round the tails of letters.

Measure

The item sets no measure: a paragraph is as wide as what holds it. The Container component holds a page to one of two widths, and both are widths for a page, not for a line of text.

max-w-3xl
48rem768px
max-w-[87.5rem]
87.5rem1400px

This site holds its own paragraphs to a narrower line than either.