CSS broken reference
What a css-broken-reference finding of fallow health means, why it matters and how to fix it.
What it reports
CSS or CSS-in-JS reference resolves to no stylesheet definition.
Styling explains how fallow finds it.
Why it matters
The class or animation name has no definition, so the element gets no style or no animation. The browser reports no error, so the defect shows only on screen.
Example
src/app.css sets animation: fade-in 1s, but no stylesheet defines @keyframes fade-in. Or markup uses class="nav-item" where only .nav-items exists.
Fix
Correct the name or add the missing definition. Keep the reference when a CSS-in-JS library or an external stylesheet defines the name.
Facts
| Fact | Value |
|---|---|
| Issue type | css-broken-reference |
| Rule id in SARIF output | fallow/css-broken-reference |
| Command | fallow health |
| Default severity | warn |
Config key in rules | css-broken-reference |
| Suppression comment | // fallow-ignore-next-line css-broken-reference |
Fixable with fallow fix | No |
| Opt-in | No |
When to keep the code
- An external stylesheet or CSS-in-JS defines the name. Fallow sees only the stylesheets of the project.