Performance: Multi-brand stylesheet generation
MEDIUM IMPACT
This affects page load speed and rendering by increasing CSS file size and complexity, impacting LCP and potentially causing slower style calculations.
$brand-colors: ( brand1: #123456, brand2: #654321 ); :root { --primary-color: map-get($brand-colors, brand1); } // Use CSS variables and shared styles, override only brand-specific values
@each $brand in $brands { @import "brand-#{$brand}.scss"; } // Each brand file duplicates many common styles with minor changes
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Duplicated brand stylesheets | Low | Low | High due to large CSS | [X] Bad |
| Shared styles with CSS variables | Low | Low | Low | [OK] Good |