Performance: Color scale generation
MEDIUM IMPACT
This affects the CSS file size and rendering speed by controlling how many color variations are generated and used in styles.
@for $i from 1 through 10 { .color-scale-#{$i} { color: lighten($base-color, $i * 5%); } }
@for $i from 1 through 100 { .color-scale-#{$i} { color: lighten($base-color, $i * 1%); } }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| 100-step color scale | Minimal (CSS only) | 0 | High due to many style rules | [X] Bad |
| 10-step color scale | Minimal (CSS only) | 0 | Low due to fewer style rules | [OK] Good |