Performance: Breakpoint tiers (xs, sm, md, lg, xl, xxl)
MEDIUM IMPACT
Breakpoint tiers affect how CSS media queries load and apply styles based on screen size, impacting rendering speed and layout shifts.
@media (min-width: 576px) { .text { font-size: 1.2rem; } } @media (min-width: 992px) { .text { font-size: 1.4rem; } } @media (min-width: 1400px) { .text { font-size: 1.6rem; } }
@media (min-width: 0px) { .text { font-size: 1rem; } } @media (min-width: 576px) { .text { font-size: 1.1rem; } } @media (min-width: 768px) { .text { font-size: 1.2rem; } } @media (min-width: 992px) { .text { font-size: 1.3rem; } } @media (min-width: 1200px) { .text { font-size: 1.4rem; } } @media (min-width: 1400px) { .text { font-size: 1.5rem; } }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Many small breakpoint tiers | No extra DOM nodes | Multiple reflows on resize | Higher paint cost due to frequent layout changes | [X] Bad |
| Fewer, well-spaced breakpoint tiers | No extra DOM nodes | Few reflows on resize | Lower paint cost with stable layout | [OK] Good |