Skip to content
  • About Us
  • Our Services

    Core services

    • Website Design On-brand designs that look beautiful
    • Website Development Scalable foundations built for growth
    • Website Management Kept updated, secure and bug-free

    Additional services

    • Convert to Blocks
    • AI Visibility Audit
    • Accessibility Audit
    • Design Reviews

    For agencies

    Outsource the work you don't have the time (or team) for.

    • White Label Design
    • White Label Management
    Not sure where to start? Let's talk
    • Website Design
    • Website Development
    • Website Management
    • Convert to Blocks
    • Design Reviews
    • AI Visibility Audit
    • Accessibility Audit
    • White Label Design
    • White Label Management
  • Our Work
  • Blog
  • Resources
    • Design to Dollars
    • Accessibility Contrast Grid
    • Font Pairings Tool
    • Free Guides
    • Video Tutorials
Get Started
  • Adam Wright Design on Facebook (opens in a new tab)
  • Adam Wright Design on Instagram (opens in a new tab)
  • Adam Wright Design on YouTube (opens in a new tab)
  • Adam Wright Design on Bluesky (opens in a new tab)
  • Adam Wright Design on LinkedIn (opens in a new tab)
Get Started

Design to Dollars · Issue #029

Why clamp is king for sizing fonts

April 25, 2024

Last issue we talked about a few tips for responsive design. 

Today, I want to carry on that theme by talking about font sizes — but how does that relate to responsive design?

Well, when you’re laying out a webpage, you natively have 3 different breakpoints at which your website will alter it’s appearance to fit — for desktop, tablet and mobile.

Most commonly, you’ll find that most designers and/or developers will setup their font sizes per breakpoint. This is a base requirement of good design, because you do not want your headings to appear the same size on mobile as they do on a desktop — they need to scale proportionately.

So if you setup your font sizes per breakpoint, for your H1 headings you’d have something like 58px for desktop, 52px for tablet, and 46px for mobile.

This can work great, and is a method I’ve personally designed and developed with for years — until recently.

This is where clamp comes into play.

What is clamp?

Clamp is a code function that sets three values — a minimum value, preferred, and maximum value. 

It appears like this:

clamp(minimum value, preferred value, maximum value)

You utilize the clamp function in place of the specific font size values in your CSS code. So instead of defining the exact size, like 58px, you just insert this clamp code (with actual values, of course).

With real values, your CSS code would look like this:

h1 {font-size: clamp(2.5rem, 1.786rem + 1.905vw, 3.5rem);

I often use this calculator to determine my clamp values: https://www.marcbacon.com/tools/clamp-calculator/.

How clamp works

Now how this works with fonts is by entering a minimum font size, which would be for mobile, and then a maximum font size — which would be for desktop (or the largest screens). 

When enabled and setup for your font sizes, your text will scale responsively and smoothly across every single pixel — not just the main three breakpoints we discussed earlier.

As you make your window smaller, the text scales incrementally, but it will never get larger than your max value, and never smaller than your min value. 

If you went the traditional route of dictating font sizes for the three main breakpoints, you would see a sudden “jolt” in the font sizes changing as they hit those certain breakpoints.

But with clamp, you get a smoother, more pleasing and consistent font scaling. 

Now and moving forward, I’m utilizing clamp because I feel that from a design perspective it’s an improved user experience. There are so many different breakpoints to consider nowadays that don’t fall in the main three, but by utilizing clamp you don’t have to worry about it!

Have any questions? Just reply to this email, I’m happy to help!

Adam Wright
Previous issue3 Responsive design tips to boost user engagement
Next issueTo drop shadow, or not to drop shadow?

Design to Dollars

Want more? Get the next issue delivered straight to your inbox.

Or browse past issues.

Name(Required)

Ready for a website that actually works for your business?

So are we, let’s build it.

Talk to Us
  • Adam Wright Design on Facebook (opens in a new tab)
  • Adam Wright Design on Instagram (opens in a new tab)
  • Adam Wright Design on YouTube (opens in a new tab)
  • Adam Wright Design on Bluesky (opens in a new tab)
  • Adam Wright Design on LinkedIn (opens in a new tab)
hello@adamwrightdesign.com

Mt. Juliet, Tennessee

The Admin Bar Featured Agency (opens in a new tab)
  • Our Work
  • Our Services
  • Contact Us
  • About AWD
  • Video Tutorials
  • Design to Dollars
  • Free Guides
  • Privacy Policy
  • Accessibility
  • Client Request Form

© 2026 Adam Wright Design LLC. All Rights Reserved.