Performance: Dark variant usage
LOW IMPACT
This affects page load speed and rendering by conditionally applying styles based on user preference or system settings.
Use Tailwind's dark variant: <html class="dark"> with classes like dark:bg-black dark:text-white@media (prefers-color-scheme: dark) { body { background-color: black; color: white; } } .dark body { background-color: black; color: white; }| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Duplicated dark styles in media queries and classes | None | 0 | Medium paint cost on theme change | [X] Bad |
| Tailwind dark variant with class toggling | None | 0 | Low paint cost on theme change | [OK] Good |