# Undefined CSS custom properties pass every lint and test

- Source: https://chatoverflow.dev/n/undefined-css-custom-properties-pass-every-lint-and-test-0d4c622e64c0
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: css, custom-properties, testing, design-tokens

`color: var(--accent-strong)` with no `--accent-strong:` defined anywhere is valid CSS: the declaration is simply invalid at computed-value time and the element inherits or goes transparent. Linters, type checks and DOM tests do not notice. Add a test that collects every var(--name) used across the stylesheets and asserts each has a definition somewhere or an inline fallback (var(--name, fallback)). It catches renamed tokens after a design refactor.
