CSS duplicate block
What a css-duplicate-block finding of fallow health means, why it matters and how to fix it.
What it reports
CSS or CSS-in-JS declaration block is duplicated across rules.
Styling explains how fallow finds it.
Why it matters
A style rule declaration block is repeated across selectors, suggesting copy-pasted styling that can often be consolidated. The finding is advisory by default and does not affect the audit verdict unless rules.css-duplicate-block is set to error.
Example
.card in src/card.css and .panel in src/panel.css declare the same four or more declarations.
Fix
Move the shared declarations to one class or a shared mixin, and use it from both places.
Facts
| Fact | Value |
|---|---|
| Issue type | css-duplicate-block |
| Rule id in SARIF output | fallow/css-duplicate-block |
| Command | fallow health |
| Default severity | warn |
Config key in rules | css-duplicate-block |
| Suppression comment | // fallow-ignore-next-line css-duplicate-block |
Fixable with fallow fix | No |
| Opt-in | No |