| Rule ID | perf/css-file-size |
| Category | Performance |
| Scope | Site-wide |
| Severity | error |
| Weight | 6/10 |
Solution
Large CSS files slow down rendering and increase bandwidth. Split large stylesheets into smaller chunks, remove unused selectors, and minify CSS. Consider critical CSS inlining for above-the-fold styles and lazy-loading non-critical CSS.Options
This rule supports the following configuration options:| Option | Type | Default | Description |
|---|---|---|---|
warn_bytes | number | 153600 (150KB) | Byte size to trigger warning |
error_bytes | number | 512000 (500KB) | Byte size to trigger error |
Configuration Example
squirrel.toml
Enable / Disable
Disable this rule
squirrel.toml
Disable all Performance rules
squirrel.toml
Enable only this rule
squirrel.toml