Skip to content
Fallow home
All docs pages

Docs home

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

FactValue
Issue typecss-dead-surface
Rule id in SARIF outputfallow/css-dead-surface
Commandfallow health
Default severitywarn
Config key in rulescss-dead-surface
Suppression comment// fallow-ignore-next-line css-dead-surface
Fixable with fallow fixNo
Opt-inNo

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.