Performance: Component-based file organization
MEDIUM IMPACT
This affects the CSS bundle size and load time by controlling how styles are split and loaded.
// _buttons.scss .button { /* styles */ } // _header.scss .header { /* styles */ } // main.scss @import "buttons"; @import "header"; // Styles split by component
@import "reset"; @import "typography"; @import "buttons"; @import "header"; @import "footer"; // All styles in one big file
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Single large CSS file | N/A | N/A | High paint cost due to blocking | [X] Bad |
| Component-based CSS files | N/A | N/A | Lower paint cost, faster style calculation | [OK] Good |