Performance: Ring and outline colors
MEDIUM IMPACT
This affects the browser's paint and composite stages by adding extra visual layers around elements, impacting rendering speed and visual stability.
<button class="focus:outline-none focus:ring-2 focus:ring-blue-500">Click me</button><button class="focus:outline-none focus:ring-4 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white">Click me</button>| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Thick ring with offset | No extra DOM nodes | 0 | High paint cost due to large ring area | [X] Bad |
| Thin ring without offset | No extra DOM nodes | 0 | Low paint cost with minimal pixels | [OK] Good |