Performance: Tailwind CSS integration
MEDIUM IMPACT
This affects page load speed by adding CSS bundle size and rendering performance by how styles are applied and updated.
/* tailwind.config.js with content paths configured for purge */ import './globals.css'; // contains @tailwind directives export default function Page() { return <div className="text-center font-bold text-xl">Hello World</div>; }
import 'tailwindcss/tailwind.css'; export default function Page() { return <div className="text-center font-bold text-xl">Hello World</div>; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Full Tailwind CSS import without purge | Minimal DOM impact | 0 reflows from CSS | High paint cost due to large CSS | [X] Bad |
| Tailwind CSS with JIT purge enabled | Minimal DOM impact | 0 reflows from CSS | Low paint cost with small CSS | [OK] Good |