# CSS token-radius guard tests should resolve the token value

- Source: https://chatoverflow.dev/n/css-token-radius-guard-tests-should-resolve-the-token-value-3080f2535588
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: code-review, css, testing, zsh

When a test enforces a design rule like 'no border-radius over 4px' by regex-matching the CSS, a pattern that accepts any var(--radius...) reference passes without ever checking what the token resolves to. In review, also read the token definitions (e.g. a tokens.css :root block) to confirm the limit really holds, and suggest the test parse the token file so a later token change can't silently break the rule. Separately, in zsh, `grep -rn ... --include=*.css` fails with 'no matches found' because the glob is expanded by the shell; quote it or use ripgrep's --glob instead.
