Foundations
Typography
A modern, accessible type system for clear hierarchy, responsive interfaces, and precise data.
Overview
Typography creates hierarchy, establishes reading rhythm, and gives an interface a consistent written voice. Use the approved type roles for every heading, control, data value, paragraph, label, and code sample. Roles communicate purpose; they are not interchangeable decoration.
Display / headings
Manrope
Display text and headings.
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serifInterface / body
DM Sans
Interface controls, body copy, labels, tables, and forms.
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serifCode / monospace
JetBrains Mono
Code, identifiers, aligned numeric values, and machine-readable text.
"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospaceUse WOFF2 variable fonts where available and set font-display: swap. Every family includes a system-font fallback so text remains visible if a web font is delayed or unavailable.
Principles / Usage Guidelines
- Hierarchy is semantic. Choose a role based on content structure, then use the matching semantic element. Do not select a heading role only because its size looks convenient.
- Readability outranks density. Body text remains stable across viewports. Responsive behavior adjusts display sizes, layout, and measure before reducing essential interface text.
- A limited weight range improves consistency. Use 400, 500, 600, and 700. Reserve 700 for major emphasis and primary headings; avoid 300, 800, and 900 in interface content.
- Line height follows the reading task. Display text uses compact leading. Paragraphs and long-form content use generous leading. Labels remain compact without touching adjacent content.
- Numbers express their context. Use proportional numerals in prose and tabular numerals in columns, metrics, counters, and changing values.
- Monospaced text is functional. Use it only when character alignment or literal syntax matters. Do not use it for long-form explanation.
Specifications & Anatomy
Font families
Manrope owns display and heading roles. DM Sans owns interface and body roles. JetBrains Mono owns code and aligned technical text. Fallback stacks are part of the token contract and must remain in the documented order.
Type scale
| Token | Size | Line height | Weight | Family |
|---|---|---|---|---|
displayXl | clamp(2.75rem, 2rem + 3vw, 4rem) | 1.1 | 700 | Manrope |
displayLg | clamp(2.5rem, 1.9rem + 2.4vw, 3.5rem) | 1.1 | 700 | Manrope |
displayMd | clamp(2.25rem, 1.8rem + 1.8vw, 3rem) | 1.15 | 700 | Manrope |
headingH1 | clamp(2rem, 1.65rem + 1.4vw, 2.5rem) | 1.2 | 700 | Manrope |
headingH2 | clamp(1.75rem, 1.55rem + 0.8vw, 2rem) | 1.25 | 700 | Manrope |
headingH3 | clamp(1.375rem, 1.28rem + 0.4vw, 1.5rem) | 1.3 | 600 | Manrope |
headingH4 | 1.25rem | 1.35 | 600 | Manrope |
headingH5 | 1.125rem | 1.4 | 600 | Manrope |
headingH6 | 1rem | 1.5 | 600 | Manrope |
bodyXl | 1.25rem | 1.6 | 400 | DM Sans |
bodyLg | 1.125rem | 1.6 | 400 | DM Sans |
bodyMd | 1rem | 1.5 | 400 | DM Sans |
bodySm | 0.875rem | 1.5 | 400 | DM Sans |
labelLg | 1rem | 1.3 | 600 | DM Sans |
labelMd | 0.875rem | 1.3 | 600 | DM Sans |
labelSm | 0.75rem | 1.35 | 600 | DM Sans |
caption | 0.75rem | 1.4 | 400 | DM Sans |
codeLg | 1rem | 1.6 | 400 | JetBrains Mono |
codeMd | 0.875rem | 1.5 | 400 | JetBrains Mono |
codeSm | 0.75rem | 1.5 | 400 | JetBrains Mono |
Weights
400Regular: body copy, captions, code, and default interface text.500Medium: restrained emphasis when regular and semibold do not provide enough distinction.600Semibold: labels, compact headings, and emphasized interface text.700Bold: display roles, major headings, and high-priority emphasis.
Line height
- Display and headings:
1.1–1.35. - Body text:
1.5–1.6. - Labels:
1.3–1.35. - Code:
1.5–1.6.
Line height values are unitless so they scale with font size and user text preferences.
Measure and readability
Set long-form content to 65ch by default. A readable range is 60ch–75ch. Use left alignment for continuous Latin-script text. Avoid justified copy because inconsistent word spacing reduces readability. Paragraph spacing comes from layout tokens, not repeated line breaks.
Numeric typography
Use proportional-nums lining-nums for numbers inside prose. Use tabular-nums lining-nums for tables, counters, and values that update in place. Use tabular-nums slashed-zero when identifiers can contain both zero and the letter O.
Monospaced text
Use JetBrains Mono for source code, commands, tokens, identifiers, version strings, hashes, and aligned technical values. Inline code inherits the surrounding line height. Multiline code preserves whitespace and scrolls horizontally when wrapping would change meaning.
Responsive typography
--type-display-xl: clamp(2.75rem, 2rem + 3vw, 4rem);
--type-display-lg: clamp(2.5rem, 1.9rem + 2.4vw, 3.5rem);
--type-display-md: clamp(2.25rem, 1.8rem + 1.8vw, 3rem);
--type-heading-h1: clamp(2rem, 1.65rem + 1.4vw, 2.5rem);
--type-heading-h2: clamp(1.75rem, 1.55rem + 0.8vw, 2rem);
--type-heading-h3: clamp(1.375rem, 1.28rem + 0.4vw, 1.5rem);Body and interface roles remain stable by default. At narrow widths, reduce column count and measure before reducing text. At wide widths, constrain measure rather than allowing lines to expand indefinitely.
Best Practices
Do
- Use one semantic heading hierarchy and preserve heading order.
- Use DM Sans for interface text and continuous reading.
- Use tabular numerals for aligned or changing data.
- Keep long-form content within the recommended measure.
- Test long labels, localization, browser zoom, and platform text scaling.
Do not
- Do not use heading styles without semantic structure.
- Do not mix unapproved families or unsupported weights.
- Do not rely on bold text or all caps as the only emphasis.
- Do not allow long paragraphs to span full-width displays.
- Do not use monospaced text for long-form prose.
Accessibility
Typography conforms to WCAG 2.2 AA.
- Maintain at least
4.5:1contrast for normal text and3:1for large text. - Support browser zoom and platform text scaling to at least
200%without loss of content or functionality. - Reflow at
320 CSS pxwithout two-dimensional scrolling, except where the content genuinely requires it. - Do not disable user font scaling or impose a fixed maximum text-scale factor.
- Preserve content when users override line height, letter spacing, word spacing, and paragraph spacing.
- Use semantic headings, paragraphs, lists, labels, and code elements so assistive technology receives the correct structure.
- Keep focus indicators and control labels visible when text wraps or scales.
- Make horizontally scrollable code blocks keyboard accessible and label them when their purpose is not clear from nearby text.
- Avoid essential text inside images; provide an equivalent text alternative when it cannot be avoided.
Typography does not create a separate keyboard interaction model. Its responsibility is to preserve readable content, semantic structure, visible focus, and usable controls at every supported scale.