Performance: Breakpoint tiers (xs, sm, md, lg, xl, xxl)
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 |
xs, which targets extra small devices like phones.col-{breakpoint}-{number} to set column width at breakpoints.col-md-6 sets the column to span 6 units on medium (md) screens and larger.d-none d-lg-block on a div?d-none hides the element on all screen sizes by default. d-lg-block makes it display as block starting from large (lg) screens and above.<div class='col-sm-4 col-md-6'></div> but on medium screens the column is still full width. What is the likely problem?col-sm-4 and col-md-6 are valid Bootstrap classes for different breakpoints.w-100 sets width to 100% (full width). w-md-auto resets width to auto starting at medium screens.w-100. On md and above, auto width with w-md-auto. Bootstrap does not have w-md-200 or similar fixed pixel classes.Pass the test and this pattern moves unknown