Performance: CSS file organization
MEDIUM IMPACT
This affects page load speed and rendering performance by controlling CSS file size and how quickly styles are applied.
/* Combined and minified CSS file */ /* reset, layout, colors, typography combined */
@import url('reset.css'); @import url('layout.css'); @import url('colors.css'); @import url('typography.css');
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple @import CSS files | No extra DOM nodes | Delays style calculation causing reflows | Higher paint cost due to delayed styles | [X] Bad |
| Single combined minified CSS file | No extra DOM nodes | Single style calculation | Lower paint cost with faster style application | [OK] Good |