Performance: Responsive typography
MEDIUM IMPACT
Responsive typography affects how quickly text adapts to different screen sizes without causing layout shifts or slow rendering.
font-size: clamp(1rem, 2vw + 1rem, 2rem);
font-size: 16px; @media (min-width: 768px) { font-size: 24px; } @media (min-width: 1200px) { font-size: 32px; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Fixed font sizes with media queries | Low | Multiple on resize | Moderate | [X] Bad |
| Fluid font sizes with clamp() | Low | Single on load | Low | [OK] Good |