Performance: @apply for extracting patterns
MEDIUM IMPACT
This affects CSS bundle size and browser rendering by reusing styles efficiently.
.btn-base { @apply px-4 py-2 rounded; } .btn-primary { @apply btn-base bg-blue-500 text-white; } .btn-secondary { @apply btn-base bg-gray-500 text-white; }.btn-primary { @apply bg-blue-500 text-white px-4 py-2 rounded; } .btn-secondary { @apply bg-gray-500 text-white px-4 py-2 rounded; }| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Repeated utility classes without @apply | N/A | 0 | Medium due to larger CSS | [X] Bad |
| Extracted shared styles with @apply | N/A | 0 | Lower due to smaller CSS | [OK] Good |