Design tokens
Every token of the baseline theme, with its value: the colours, type, spacing, radii, shadows, motion and breakpoints every built-in is drawn with.
A design token is a named value — a colour, a size, a duration — that every built-in is drawn with. A theme changes the ones it names and keeps the rest; each becomes a CSS custom property on :root.
wf
theme Brand {
color-primary: #0F766E
radius-md: 14px
screen-md: 900px
}
Read one in a style { } block as $name — background: $color-surface, or the short form the property's group resolves, padding: $lg for spacing-lg — and in a stylesheet as var(--color-surface). A theme may add tokens of its own (surface-raised: #131519) and read them the same way. The build writes only the tokens something in the output names.
The baseline
Colour
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Font
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Spacing
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Radius
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Shadow
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Motion
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Easing
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Breakpoints
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Code
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Terminal
| Token | Baseline |
|---|---|
|
|
|
|
|
|
|
|
|
Layout
| Token | Baseline |
|---|---|
|
|
|
71 tokens in all.
Short names
In a style block, a short name is resolved by the property it is given to:
| Property | Group |
So |
|---|---|---|
|
|
spacing |
|
|
|
colour |
|
|
|
font size |
|
|
|
line height |
|
|
|
radius |
|
|
|
shadow |
|
|
|
transition |
|
A full name — $color-text-muted, $spacing-lg, a token of your own — works in any property.
Checked by the test suite
Every code block in the guide is parsed, checked and type-checked on each release.