Performance: Tailwind CSS with Remix
MEDIUM IMPACT
This affects page load speed by controlling CSS bundle size and rendering performance by how styles are applied and updated.
import tailwindStyles from './tailwind.css'; export const links = () => [{ rel: 'stylesheet', href: tailwindStyles }]; export default function App() { return <div className="p-4 m-4 bg-blue-500 text-white">Hello Remix</div>; }
import './tailwind.css'; export default function App() { return <div className="p-4 m-4 bg-blue-500 text-white">Hello Remix</div>; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Full Tailwind CSS import without purge | Minimal | 0 | High due to large CSS | [X] Bad |
| Purged Tailwind CSS with Remix links | Minimal | 0 | Low due to small CSS | [OK] Good |