CSS Clamp Generator

Make a font size or spacing that grows smoothly between two screen widths.

How it works

Makes a font size or spacing that grows smoothly between two screen widths using CSS clamp(min, preferred, max).

The formula

preferred = min + (max - min) x (100vw - minWidth) / (maxWidth - minWidth)

Good to know

Common questions

What does clamp do?
It picks the middle value but never goes below the minimum or above the maximum.
Do I still need media queries?
Often not for type and spacing.
Which browsers support it?
All current browsers.

More in Design.