Typography

One sans for every word, mono for what a person copies.

Rules

  1. typography-roles MUST Set text with a type-* role utility; never a raw font size or weight. Because a raw size skips the role's line height, tracking and weight, so the line sits off its neighbours.
    • Correct: <p className="type-body">
    • Wrong: <p className="text-[15px] font-semibold">
  2. typography-size-not-weight MUST Make hierarchy with size; display, headings, labels and buttons are 400, running text 340. Because font-bold is 700, heavier than any role, so one bold heading outranks the page title.
    • Correct: <h2 className="type-heading">Runs</h2>
    • Wrong: <h2 className="font-bold">Runs</h2>
  3. typography-fallback-width NEVER Set a font width; Quartz Sans and Quartz Mono are not bundled, so --font-sans and --font-mono render the platform UI sans and monospace at their normal width. Because a width meant for Quartz Sans lands on whatever font renders instead, and a stretched system sans overflows buttons and table heads sized for Normal.
    • Correct: <h1 className="type-display">
    • Wrong: <h1 className="type-display [font-variation-settings:'wdth'_620]">
  4. typography-sentence-case MUST Write sentence case everywhere, including buttons and table heads. Because title case makes ordinary words look like proper nouns, so Refund Policy reads as a product name.
    • Correct: <Button>Create agent</Button>
    • Wrong: <Button>Create New Agent</Button>
  5. typography-mono-ids MUST Set mono only for code, commands, paths, IDs and keys; give numbers the data utility for tabular figures. Because mono marks what a person copies, so a mono duration looks like an id, and data already lines figures up in the sans.
    • Correct: <span className="type-body-sm data">2m 14s</span> <code className="type-code-sm">run_8f2a91</code>
    • Wrong: <span className="type-code-sm">2m 14s</span>
  6. typography-sentences-body SHOULD Set a full sentence at body-sm or larger in text-2; label-sm in text-3 is for short metadata. Because 12px at the 5:1 floor holds a word or two, and a whole sentence at that size is tiring to read.

Tokens

TokenRoleUse forNot forLightDark (blank: same as light)
--font-sansall UI and prose: Quartz Sans where declared, else the platform UI sansall UI and prosecode"Quartz Sans", ui-sans-serif, system-ui, sans-serif
--font-monoQuartz Mono where declared, else the platform monospacecode and anything copiedlabels"Quartz Mono", ui-monospace, "SF Mono", Menlo, monospace
--weight-bodyRegularrunning textheadings340
--weight-mediumMediumlabels, buttons, headingsprose400
--weight-strongSemiboldemphasis inside prose, code keywords500
--width-normaleach face's own width; Quartz Sans's Normal file has no width axis, and a "wdth" value here would stretch the fallback sansevery rolenormal
--features-datatabular figures, slashed zero, serif I; every duration, count and valuedurations, counts, valuesprose"tnum", "zero", "ss04"
--features-idserif I tells I, l and 1 apartidentifiers in sans"ss04"
--type-display-xlmarketing hero, line-height 1.0marketing heroapp400 80px/80px var(--font-sans)
--type-display-lgsection heads, line-height 1.1marketing section headsapp400 60px/66px var(--font-sans)
--type-displaymobile hero, page titles with statspage titles with stats, mobile heroheadings400 40px/44px var(--font-sans)
--type-heading-lgpage titlespage titlescards400 32px/36px var(--font-sans)
--type-headingpanel and section titlespanel and section titleslabels400 24px/28px var(--font-sans)
--type-heading-smsubsection titlessubsection and card titlesbody400 20px/24px var(--font-sans)
--type-heading-xsin-thread headingsin-thread headingslabels400 16px/20px var(--font-sans)
--type-body-lgmarketing and docs prose, line-height 1.4marketing and docs proseapp tables340 16px/22px var(--font-sans)
--type-bodyapp proseapp prose, descriptionslabels340 14px/20px var(--font-sans)
--type-body-smdense meta, a step heavier than body so meta on text-3 still readsdense metalong prose380 13px/18px var(--font-sans)
--type-buttondefault and large button labellarge button labelsprose400 16px/20px var(--font-sans)
--type-labelcontrols and table cellscontrols, table cells, tabssentences400 14px/16px var(--font-sans)
--type-label-smsmall tags, column headssmall tags, column headssentences400 12px/16px var(--font-sans)
--type-codecode blockscode blocks, logslabels400 13px/20px var(--font-mono)
--type-code-smIDs, ordinals, paths in tablesIDs, paths, inline codedurations400 12px/16px var(--font-mono)
--type-tagids, methods, status codes and paths in a row or a code tag; the metrics of code-sm under its own name so the two cannot driftrow id, code tag, key tailvar(--type-code-sm)
--type-code-displaya code a person reads aloud or types on another deviceCLI device code, recovery code400 32px/36px var(--font-mono)
--type-code-touchcode typed into a field on touch; 16px so iOS WebKit does not zoom on focus (trap/touch-input-zoom)terminal input, code inputs below 640px400 16px/22px var(--font-mono)
--type-stat-xlmarketing stat numerals, tabular figures, plain sansstat size xl400 48px/52px var(--font-sans)
--type-stat-lghero stat in the app, tabular figuresstat size lg400 40px/44px var(--font-sans)
--type-statapp stat numerals, tabular figuresapp stat numeralsprose400 32px/36px var(--font-sans)
--type-state-wordstatus words, the label role in sentence casestatus wordslabels400 14px/16px var(--font-sans)
--tracking-displaydisplay sizesdisplay sizes14px and below-0.025em
--tracking-headingheading sizesheading-lg, heading, heading-sm-0.015em
--tracking-body16px text: body-lg and buttonbody-lg, button-0.01em
--tracking-text14px and below, where negative tracking closes the countersbody, body-sm, label, label-sm0em
--code-string-alphathe alpha of ink in a string; the dark theme lowers it so strings part from plain codecode0.800.72
--code-comment-alphathe alpha of ink in a comment; --code-comment is 5.3:1 on --surface-card in both themescode0.660.54
--code-textidentifiers, punctuationcodevar(--ink)
--code-stringstringscodeoklch(var(--ink-c) / var(--code-string-alpha))
--code-commentcommentscodeoklch(var(--ink-c) / var(--code-comment-alpha))
--code-promptthe $ in shell snippetssnippetoklch(var(--ink-c) / 0.40)

Decision table

You needUse
App prosetype-body
Control or table celltype-label
Column head or tagtype-label-sm
ID, path, commandtype-code-sm
Page titletype-heading-lg

Scale

Sizes: 12, 13, 14, 16, 20, 24, 32, 40, 48, 60, 80px.

Reject list

  • No weights above 500 for hierarchy, and no all-caps text or tracked-out letters.
  • Color: Five hues name the kind of thing, and amber and red mean trouble.
  • Space: How much room goes between things, in steps of 4px.