What is CSS Clamp Calculator?
CSS clamp sets a minimum value, a preferred fluid value, and a maximum value in one expression. It is commonly used for responsive font sizes and spacing because it can scale smoothly between mobile and desktop without writing several media queries.
How to use this tool
- Enter the smallest and largest size you want the property to use.
- Enter the viewport width where the smallest value should start and the viewport width where the largest value should stop.
- Choose the CSS property you want to generate.
- Copy the clamp expression into your stylesheet and test it at mobile, tablet, and desktop widths.
What you can use it for
- Create fluid headings without many media queries.
- Scale spacing smoothly between mobile and desktop.
- Copy a clamp value directly into CSS.