Performance: Arbitrary variants for custom selectors
MEDIUM IMPACT
This affects the CSS selector complexity and browser style calculation time, impacting page rendering speed.
class="bg-red-500 text-lg"class="[&:nth-child(3)]:bg-red-500 [&>div]:text-lg"| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Complex arbitrary variants | No extra DOM nodes | 0 reflows | Higher paint cost due to slower style calculation | [!] Caution |
| Simple utility classes | No extra DOM nodes | 0 reflows | Lower paint cost with fast style calculation | [OK] Good |