Performance: Background color utilities
MEDIUM IMPACT
Background color utilities affect paint time and visual stability during page load and interactions.
<div class="bg-blue-500">Content</div><div class="bg-red-500 bg-green-500 bg-blue-500">Content</div>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple conflicting bg color classes | No extra DOM nodes | 0 | Multiple paints due to style conflicts | [X] Bad |
| Single bg color utility class | No extra DOM nodes | 0 | Single paint | [OK] Good |
| Bg color with opacity utility | No extra DOM nodes | 0 | Extra paint layers | [! ] OK |
| Direct RGBA background color | No extra DOM nodes | 0 | Single paint layer | [OK] Good |