Performance: Breakpoint prefixes (sm, md, lg, xl, 2xl)
MEDIUM IMPACT
Breakpoint prefixes affect how CSS rules apply at different screen sizes, impacting rendering and layout recalculations during resizing.
class="p-4 m-4 text-center sm:text-lg sm:bg-blue-500"class="p-4 m-4 text-center text-lg bg-blue-500"| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| No breakpoint prefixes (all styles apply always) | Minimal | Multiple on resize | Higher due to layout shifts | [X] Bad |
| Using breakpoint prefixes to scope styles | Minimal | Single or fewer on resize | Lower due to stable layout | [OK] Good |