CSS dead surface
What a css-dead-surface finding of fallow health means, why it matters and how to fix it.
What it reports
CSS or CSS-in-JS surface appears unused.
Styling explains how fallow finds it.
Why it matters
The unused style still ships to users and still gets updated in redesigns. A dead scoped class often means that the markup changed and the style stayed behind.
Example
Card.vue defines .card__badge in <style scoped>, but no part of the component uses that class.
Fix
Delete the unused class after you check that no code adds it at runtime, for example through a class name built from a variable.
Facts
| Fact | Value |
|---|---|
| Issue type | css-dead-surface |
| Rule id in SARIF output | fallow/css-dead-surface |
| Command | fallow health |
| Default severity | warn |
Config key in rules | css-dead-surface |
| Suppression comment | // fallow-ignore-next-line css-dead-surface |
Fixable with fallow fix | No |
| Opt-in | No |
When to keep the code
- Code builds the class name at run time, or code outside the project uses the styling. Fallow cannot see these uses.