CSS token drift
What a css-token-drift finding of fallow health means, why it matters and how to fix it.
What it reports
CSS or CSS-in-JS hardcoded styling value bypasses the design token system.
Styling explains how fallow finds it.
Why it matters
A hardcoded value does not follow a change of the design token. A theme or brand update misses this place, and the interface becomes inconsistent.
Example
Markup uses class="w-[13px] bg-[#1a2b3c]", Tailwind arbitrary values, or a stylesheet sets color: #1a2b3c where the project has color tokens.
Fix
Replace the value with the nearest token of the scale. Keep the value when the one-off value is deliberate.
Facts
| Fact | Value |
|---|---|
| Issue type | css-token-drift |
| Rule id in SARIF output | fallow/css-token-drift |
| Command | fallow health |
| Default severity | warn |
Config key in rules | css-token-drift |
| Suppression comment | // fallow-ignore-next-line css-token-drift |
Fixable with fallow fix | No |
| Opt-in | No |
When to keep the code
- A value that must differ from the scale on purpose. To leave out some Tailwind arbitrary values, set
health.tailwindIgnorePatterns.