Field Notes
Naming Conventions

Semantic Naming

The --{element}-{qualifier} pattern for purpose-driven tokens.

Pattern

--{element}-{qualifier}

Semantic tokens describe what a value is for, not what it looks like. The element identifies the category; the qualifier narrows it to a specific role or intensity.

Elements

ElementPurposeExamples
surfacePage and component backgrounds--surface-background
textText and icon colors--text-primary, --text-secondary
borderBorders and dividers--border-default, --border-subtle
typeTypography properties--type-family-text, --type-size-heading-02
spaceSpacing values--space-sm, --space-md
radiusBorder radius values--radius-sm, --radius-md
sizeDimension values--size-4, --size-8
actionInteractive element colors--action-primary, --action-destructive

Qualifiers

Qualifiers use role-based names that describe intensity or purpose:

Qualifier typeValuesUsed with
Hierarchyprimary, secondary, tertiarytext, action
Intensitydefault, subtle, strongborder, surface
Rolebackground, overlay, accentsurface
Scalesm, md, lg or numeric (4, 8, 16)space, radius, size
Namedtext, mono, heading-02, smalltype

Full Examples

--surface-background         /* main page background */
--text-primary               /* default body text */
--text-secondary             /* de-emphasised text */
--border-default             /* standard border */
--border-subtle              /* lighter divider */
--type-family-text           /* body font stack */
--type-family-mono           /* code font stack */
--type-size-heading-02       /* second-level heading size */
--space-md                   /* medium spacing unit */
--radius-md                  /* medium corner radius */
--action-primary             /* primary interactive color */

Relationship to Primitives

Semantic tokens alias primitive tokens. The semantic name stays stable across themes; the underlying primitive value changes:

/* Light theme */
--text-primary: var(--colors-neutral-950);

/* Dark theme */
--text-primary: var(--colors-neutral-50);

Components always consume semantic tokens, never primitives directly.

On this page