What does typography do?
Typography carries the personality of a screen. Some values here are exact and missing them is a finding; tracking, pairing and scale ratios are heuristics.
Choosing faces
- One family, or two that are clearly different (serif display + sans text, or sans + mono for figures). Two near-identical sans-serifs read as a mistake. Rarely more than three fonts; apps fewer than marketing pages.
- Choose for the character in
DESIGN.md, not the face you'd reach for on any project. Don't swap a font that's part of a real brand. Inter-by-default nobody chose may be replaced when another family fits better. - Native apps: the system font (SF Pro / Roboto) already ships optical sizes and tracking tables — a strong default. A custom display face for headlines and moments is fine.
- Load every weight and style you use (
next/font,@font-face,expo-font). Never let the browser synthesize bold or italic. - Don't propose a new typeface (paid or free) unless the task is a type change.
The scale
A small set of sizes, each paired with line-height, weight and tracking, named by role. In Tailwind v4:
@theme {
--text-caption: 0.8125rem; --text-caption--line-height: 1.4;
--text-label: 0.875rem; --text-label--line-height: 1.35;
--text-body: 1rem; --text-body--line-height: 1.55;
--text-lead: 1.125rem; --text-lead--line-height: 1.5;
--text-title: 1.5rem; --text-title--line-height: 1.25; --text-title--letter-spacing: -0.01em;
--text-headline: 2.25rem; --text-headline--line-height: 1.15; --text-headline--letter-spacing: -0.02em;
--text-display: 3.5rem; --text-display--line-height: 1.05; --text-display--letter-spacing: -0.025em;
}
Then text-title, text-body. Heading sizes descend with level; a subordinate heading never outweighs its parent.
Exact rules
- Line-height by role, unitless: display ~1.05–1.1, headings 1.2–1.3, body 1.5–1.6. Anything that wraps to 3+ lines needs ≥ 1.4 — no
leading-tighton card descriptions. - Tracking by size, in
em: headings ≥ 24px get-0.01emto-0.025em; body0; small uppercase labels (if you use them at all)+0.05em. Never negative tracking on small text. - Weights: below 18px use 400 or heavier. 100–300 only at 28px and up. Hierarchy from size and color first, weight second; two or three weights total.
- Measure: cap long-form text at 60–75 characters (
max-w-[65ch]). - Sizes: long-form body starts at 16px (
rem, so user settings apply). UI text can be 14px, captions 13px, rarely below 12px. - Inputs on iOS web: 16px minimum or Safari zooms the page.
text-base sm:text-sm, nevermaximum-scale=1. - Numbers that change (timers, counters, prices, table columns):
tabular-nums. One number format across the screen. - Smoothing once on the root (
antialiasedonbody), never per component.
Wrapping and truncation
text-balanceon headings and short descriptions (not paragraphs).text-prettyon paragraphs.break-words/wrap-anywherewhere a URL, email or ID could escape.whitespace-nowrapon badges and short labels.truncatefor one line,line-clamp-2/3for previews — always with a way to the full text (tooltip, title, detail view).- Truncate in the middle when items differ at the end (file names, hashes). Never truncate numbers, amounts or dates.
- Interface text is
text-start; nojustify.
Details
- Store text in natural case; apply case with
uppercaseonly if the design truly needs it. Sentence case is the default for headings, buttons and labels. - Typographic punctuation in rendered text: curly quotes,
…, en dash for ranges (9–5), non-breaking spaces between number and unit. Code keeps straight quotes. - No italic for emphasis in UI; use weight or color.
- Underlines:
underline-offset-[0.2em] decoration-from-font(or tuned thickness). Dotted underline hints extra info. font-variant-numericproperties, notfont-feature-settings(tabular-nums,slashed-zero).font-weight: 650, notfont-variation-settings. Leave optical sizing onauto.- In tight containers (buttons, badges),
text-box: trim-both cap alphabeticas progressive enhancement fixes text sitting low. - Set
langanddir; wrap mixed-direction values in<bdi>. - Keep content selectable.
select-noneonly on controls and drag surfaces.
Native specifics
- Respect Dynamic Type:
allowFontScalingstays on; layouts must survive 200% text. UsemaxFontSizeMultiplieronly on tight chrome (tab labels), never on body. - Never animate to a measured text height — it's wrong at a larger text size.
- Use
fontVariant: ['tabular-nums']for timers (NativeWindtabular-numsmaps to it).
Before you finish
| Pattern | Fix |
|---|---|
font-light/font-thin under 18px | 400+ |
leading-none/leading-tight on wrapping text | ≥ 1.4 |
tracking-tight on small text, tracking in px | em, only on large text |
Timer/price without tabular-nums | Add it |
..., --, - ranges in UI strings | …, em dash, en dash |
text-balance on a paragraph | text-pretty |
Input text-sm with no mobile override | text-base sm:text-sm |
| ALL-CAPS tracked eyebrow above every heading | Remove, or one deliberate overline |