Understanding a project
Point out rules that style nothing
Understanding a project · 1 min read
Tells you when a style rule does not match anything in your project any more.
When you would want it
A rule left behind by a deleted component is invisible, and stylesheets only ever grow.
Where to find it
- All Features → Point out rules that style nothing
- Find them
- Turn on or off
- Settings
What you get out of it
- Stylesheets stop growing forever - dead rules become visible and removable.
- On-demand scanning means the check exists even on projects where the automatic version would lie.
How to use it, step by step
- Off by default. View - Find Unused CSS Rules runs it on the open stylesheet on demand, whatever the setting.
- It answers 'every rule matches something' when nothing is dead.
- Turn the setting on to have findings appear as you work.
- Caveat: it compares names, so classes built at runtime or by CSS modules escape it - trust it less on those projects.
Why this beats the usual way
Dead-CSS detectors that claim certainty lie on modern tooling and get switched off. One that states its limits - and stays reachable on demand - keeps being used for years.
Find it in Universal Search
Point out rules that style nothing · Understanding a project · dead css · unused rules · stylesheet cleanup · selector matches nothing