Performance: Group-hover (parent triggers child)
MEDIUM IMPACT
This affects how CSS selectors trigger style changes on hover, impacting paint and composite stages during user interaction.
<div class="group hover:bg-gray-100"> <p class="group-hover:text-red-600">Text</p> </div>
<div class="parent" onmouseover="document.getElementById('child').style.color='red'" onmouseout="document.getElementById('child').style.color='black'"> <p id="child">Text</p> </div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| JavaScript hover handlers | Multiple style changes | Multiple reflows per hover | High paint cost | [X] Bad |
| Tailwind group-hover CSS | No DOM changes | No reflows | Single paint and composite | [OK] Good |