Design system tokens #67
Reference in New Issue
Block a user
Delete Branch "issue/45-design-tokens"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #45.
Extends
.impeccable/design.jsonand the:roottoken block inweb/src/style.css:--verdict-eligiblegreen,--verdict-waivedamber,--verdict-rejectedquiet slate. Rejected is the policy working, so it is neutral — fault red stays reserved for daemon failures. Each bucket also carries a non-colour mark (solid tinted border / dashed border / the killing rule’s name), so the three read without colour.airing>incomplete>waiting) plus neutrals for satisfaction (complete,ended). Deliberately not an error/warning/success ramp.--text-2xs…--text-xl); all literal font-sizes, colours and the pressed/hover derivations in components replaced with tokens.Acceptance:
web/scripts/check-tokens.mjsfails CI on literal colour or margin/padding/gap values outside:root(relative colour derived from a token is allowed). Wired intojust ciand the CI workflow; verified it catches injected violations.@@ -0,0 +31,4 @@const COLOR_LITERAL = /#[0-9a-fA-F]{3,8}\b|\b(?:oklch|oklab|lab|lch|rgba?|hsla?|hwb|color)\(/;const RELATIVE_FROM_TOKEN = /\b(?:oklch|oklab|lab|lch|rgb|hsl|hwb|color)\(\s*from\s+var\(--/g;const SPACING_PROP = /^(?:margin|padding|gap|row-gap|column-gap|inset)(?:-[a-z-]+)?$/;The gate never inspects
font-size, although the added type-scale rule says components must not carry literal font sizes and CI is documented as enforcing it. A later literalfont-sizewill therefore pass. Add a font-size property/value check that acceptsvar(--text-*)(and any intentional exceptions).Fixed in
2ba18c7— the gate now checksfont-sizedeclarations: anything but avar(--text-*)token fails (a spacing token in font-size fails too). Verified against injected literals.Reviewed
2ba18c749c01ae603ba23e48e9dd976428f001f1. No findings.