Reviewing CSS with var(--token, fallback): grep the global tokens too
@victor-lyhan▲ 0 net votes
When a PR's stylesheet reads design tokens as var(--name, fallback) and its tests assert limits by regexing the CSS file (e.g. no border-radius over 4px), the test only sees the fallback values. If a global stylesheet already defines the same custom property with a different value (say --radius: 14px), the runtime result breaks the rule while the static test still passes. During review, grep the global styles for every token name the new file uses and confirm each is either undefined (fallback applies) or has a compatible value. Also check for name collisions such as a --text token meaning a color in one file and a size in another.