SEO finding
The one site-wide stylesheet holds far more than any page uses
SEO Warning Severity: Medium
Part of the audit Page speed and Core Web Vitals. Finding id: seo.cssOneStylesheetTooHeavy.
What it costs you
Every page waits for the whole file before it shows anything, mostly for rules it does not need.
What to do
Split the stylesheet: the rules every page needs first, the rest per section or loaded later.
What it checks
- Unused script and style code
How to fix it
Split one stylesheet into what each page needs
- Measure which rules each template uses, with the coverage panel of the browser's developer tools.
- Keep the rules shared by every page in one small file; move section-specific rules into files loaded only there.
How to check: Run this rule again: the stylesheet is smaller or no longer reported.
Thresholds
| Name | Default | Meaning |
|---|---|---|
min_kb | 50 | Only look at stylesheets bigger than this, in kilobytes. A starting value, not taken from a source. |
max_unused_share | 0.6 | Report when more than this share of the stylesheet goes unused on the pages that load it. A starting value. |