Performance: Adjust-hue for color rotation
MEDIUM IMPACT
This affects the CSS paint time and rendering speed because color adjustments can trigger repaints.
$color: #3498db; $adjusted-color: adjust-hue($color, 120deg); .element { color: $adjusted-color; background-color: $adjusted-color; border-color: $adjusted-color; }
$color: #3498db; .element { color: adjust-hue($color, 120deg); background-color: adjust-hue($color, 120deg); border-color: adjust-hue($color, 120deg); }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple adjust-hue calls on same color | No extra DOM nodes | 0 | Multiple repaints | [X] Bad |
| Single adjust-hue calculation reused | No extra DOM nodes | 0 | Single repaint | [OK] Good |