← All posts

Fluid Typography with CSS clamp(): From 16px to 24px the Smart Way

Fluid type scales smoothly between breakpoints with a single line of CSS.

Use the PX ⇄ REM Converter →

The formula

font-size: clamp(1rem, 0.75rem + 1vw, 1.5rem);

How it works

clamp(min, preferred, max) picks the preferred value but clamps to min/max. Replace pixel breakpoints with one expression.

Tips