DTK-R02/norms/rules/design-tokens/DTK-R02.md
CSS from tokens is rebuilt
MUSTblockscheckactive
The CSS variables file (out) matches what build produces from the current tokens.
Why: Code takes values from CSS variables, design edits tokens. If the CSS is not rebuilt, an edit to a token does not reach the screen, and a manual edit to the CSS is lost at the next build.
Enforcer: checks/fresh.ts
The CSS variables file (out) matches what build produces from the current tokens.
What counts as a violation. The out file does not exist or differs from the build. If the tokens have errors, this check stays silent; DTK-R01 names them.
Why. Code takes values from CSS variables, design edits tokens. If the CSS is not rebuilt, an edit to a token does not reach the screen, and a manual edit to the CSS is lost at the next build.
Run. shtuk run design-tokens fresh. A violation is a line, exit code 1. The files are the source, dark and out fields of the page Design tokens.
How to fix. Rebuild: shtuk run design-tokens build. Change values in the tokens, not in the CSS.
The package Design tokens (W3C DTCG) puts this page at
/norms/rules/design-tokens/DTK-R02.md.Source text