Rules
Using the tokens
Every style in Dugout's code uses a token, a named value, and never a raw value.
How names are built
A token is --ds-, then what it is, then which one: --ds-text-xl is the extra-large text size, and --ds-duration-pop is how long a panel takes to open.
In code
Write
color: var(--ds-muted);
Not
color: #5d5d63;
Components use role tokens, such as --ds-muted, never a primitive such as --ds-neutral-600. Tests fail the build on a raw value or a primitive in a component’s style sheet.
Changing a token
Change the existing token’s value rather than adding a second token for the same job. Delete a token nothing uses.
Every token is defined in src/ds/tokens.css and listed in the README. A test fails if one is missing from the list.