Performance: Important modifier for specificity
MEDIUM IMPACT
This affects CSS specificity and how styles override each other, impacting rendering speed and style recalculation.
@layer components { .btn-primary { @apply text-blue-600; } }@layer utilities { .btn { color: blue !important; } }| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Using !important in Tailwind | No extra DOM nodes | Triggers style recalculation on conflict | May cause layout shifts if styles change | [!] OK |
| Using Tailwind layering and utilities | No extra DOM nodes | Minimal style recalculation | Stable layout, no shifts | [OK] Good |