Skip to content

typography

The type treatment of a text element — family, size, spacing and case.

Path

…elements.<element>.styles.typography

Elements Supported

text

Value

TokenReference

A design token, written as a $token path plus a $type, as in { $token: Color/On surface, $type: color }. The consuming platform resolves it to a value.

$token: Type/Body/Default
$type: typography

Typography

One or more typography properties, inline

fontFamily: Inter
fontStyle: Semi Bold
fontSize: 16
lineHeight: 24
letterSpacing: 0
textCase: ORIGINAL

null (default)

Themes

A TokenReference written here resolves under the theme in force on this element — the one it selects in themes, or the nearest ancestor’s. The same token path yields a different value under a different theme.

Platform bindings

Figma

Disposition: bound · Realised by: rule namedStyleVersusInline

Accepts Typography or TokenReference. A font that fails to load degrades to Inter Regular with a warning, never aborts.

CSS

Disposition: approximated · Realised by: typography

A resolvable token emits the font shorthand plus a companion letter-spacing, since the shorthand cannot carry tracking. Otherwise each member emits its own property, and fontStyle is split into font-weight and font-style. Loss: a weight word absent from the recognised map loses font-weight while italic detection still succeeds; textCase and textDecoration values outside their maps are dropped silently; and the companion letter-spacing depends on a pattern match against the resolved variable name, which if it fails loses tracking.

Decisions

  • ADR-005 — Replace Typography Flat Properties with typography — Add Typography Type
  • ADR-006 — Unified Token Reference Type — Replace VariableStyle and FigmaStyle with TokenReference
  • ADR-032 — Typography leadingTrim — Correct to String Enum
  • ADR-033 — Typography fontFamily/fontStyle — Remove Number, Add TokenReference
  • ADR-075 — conventions.primitives — a Declared Table from Styles to a Component’s Props
  • ADR-113 — Style defaults belong to the schema

Further reading

Rules

RuleStatement
DSPEC-44Every Styles property declares a default valid against its own schema
DSPEC-45A declared default is a literal, never a reference or conditional

Source

FormatFile
JSON Schemapackages/schema/schema/styles.schema.json
TypeScriptpackages/schema/types/Styles.ts
Specification§4.1a, §11