ShtukbaseStandard
DTK-R04/norms/rules/design-tokens/DTK-R04.md

Este texto aún no está traducido. Debajo está el original en inglés.

A style reports its health against the token contract

SHOULDavisacomprobaciónactiva
The health of a style is reported in bands (full, missing, fallbacks, extra); a style that is not full is told, never stopped.
Por qué: A style is a swappable part only while it fits the contract, but a work in progress, a plain shadcn theme or an old style must still install and run. So the style convention only informs: it names what is missing, which defaults apply and which names are outside the contract.
Campos de la página (15)
ruleIdDTK-R04
requirementThe health of a style is reported in bands (full, missing, fallbacks, extra); a style that is not full is told, never stopped.
levelSHOULD
floorfalse
statusactive
spheredesign
appliesTo/design
enforcers.shtukbase/packages/design-tokens/checks/health.ts
enforcerKindgate
modewarn
becauseA style is a swappable part only while it fits the contract, but a work in progress, a plain shadcn theme or an old style must still install and run. So the style convention only informs: it names what is missing, which defaults apply and which names are outside the contract.
baseline0
reviewBy2027-05-29
packdesign-tokens
railRead the lines "health style/<id>": add the missing names to the style tokens (and to the dark tokens for a colour), build the style again; fallbacks and extras are information.

The convention A design style has its health in this norm. The check health judges the style chosen on Design and prints one line per band:

health style/<id>: full
health style/<id>: missing: <names>
health style/<id>: fallbacks: <names>
health style/<id>: extra: <names>

Run. shtuk run design-tokens health (the chosen style); --style <id> another style, --all every /design/<id>/tokens.css, --css <file> any CSS file by hand. The exit code is always 0: the check informs and never fails, so shtuk check shows the lines under a PASS.

What the bands mean. full: every required name is set in :root, every colour has a dark value. missing: a required name, a dark value (--x (dark)) or a reference that leads nowhere (--x (broken in light)); the style works only partly. fallbacks: optional names the style leaves out; the defaults of the contract apply. extra: names the style sets that the contract does not know (a hint that the contract may grow; the Tailwind mirror names --color-* are not counted).

The hard check. DTK-R03 is the same judgement as a gate for a project that wants one. This norm is the report that never blocks.

El paquete Design tokens (W3C DTCG) coloca esta página en /norms/rules/design-tokens/DTK-R04.md.Texto fuente