CSS Clamp

Generate a fluid CSS clamp() that scales a font size or spacing smoothly between two viewport widths — output uses rem + vw, ready to paste into your stylesheet.

The size grows linearly from the min to the max as the viewport widens between the two widths, then stays clamped outside that range. Output uses rem + vw so it respects user zoom.

font-size: clamp(1rem, 0.8333rem + 0.8333vw, 1.5rem);
Min
1rem
Preferred
0.8333rem + 0.8333vw
Max
1.5rem