Performance: Border utilities
MEDIUM IMPACT
Border utilities affect the browser's paint and composite stages by adding visual borders to elements, impacting rendering speed and visual stability.
<div class="border border-primary border-3"></div>
<div class="border border-primary border-3 border-top-0 border-end-0"></div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple conflicting border utilities | No extra DOM nodes | Multiple reflows if borders change | High paint cost due to overlapping borders | [X] Bad |
| Single combined border utility class | No extra DOM nodes | Single reflow | Minimal paint cost | [OK] Good |