Vol. VII  ·  No. 212  ·  Weekly Edition Reader-Supported Edition

The Weekly Journal of

Type  ❖  Print  ❖  Paper  ❖  The Craft of the Page

Setting a Fluid Type Scale with CSS clamp()

By Daniel Ferreira September 18, 2026 Web Type 2 min read 93 Views 12 Comments

One line of CSS per heading, and no media queries in sight.

Photograph: Daniel Ferreira for the Courier.

A type scale that grows with the viewport used to mean a stack of media queries. Today a single clamp() call does the same work with less code and smoother results.

Setting type in the browser is still typesetting. The measure, the leading and the rhythm of the page matter as much on a screen as they did in a chase.

From the Case to the Stylesheet

Fluid heading sizes with clamp()CSS
:root {
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
}
h1 { font-size: var(--step-2); }
h2 { font-size: var(--step-1); }
p  { font-size: var(--step-0); }

The good news is that CSS now gives us most of the controls a compositor had, from ligatures to hanging punctuation, if we are willing to use them.

  • Limit the measure with the ch unit.
  • Use unitless line-height values.
  • Load only the font weights the page actually uses.

Have a correction or a story of your own? Write to the desk at desk@example.com and we will add it to the next issue.

Share This Dispatch

D

Daniel Ferreira

Photo Editor

Daniel shoots on film, prints cyanotypes in his yard and edits every photograph that runs in the Courier.

12 Comments  on this dispatch

  1. T
    Tomás Rivera Reply ›

    Lovely piece. The photographs alone are worth the subscription.

    1. L
      Lucas Moreau Reply ›

      I had no idea. Now I want to go and see it for myself.

    2. K
      Kwame Mensah Reply ›

      Well put. I could not have said it better.

    3. T
      The Courier Desk Staff Reply ›

      We will pass this on to the author, who will be glad to hear it.

  2. A
    Ada Kowalczyk Reply ›

    I appreciate that you mention the mistakes as well as the successes.

  3. H
    Harriet Mills Reply ›

    This brought back memories of my grandfather’s print shop. Thank you for writing it.

  4. F
    Felix Brandt Reply ›

    The part about paper grain finally made it click for me. Thank you.

  5. F
    Felix Brandt Reply ›

    Great write-up. Bookmarking for the next workshop I teach.

    1. T
      The Courier Desk Staff Reply ›

      Good point, and one we hope to cover in a future issue.

  6. M
    Marisol Ortega Reply ›

    We have a drawer of this exact wood type at our shop. I never knew where it came from until now.

  7. P
    Pieter de Wit Reply ›

    I tried this at home last weekend and it went about as well as you would expect for a first attempt. Going again on Saturday.

  8. T
    Tomás Rivera Reply ›

    Any recommendations for a first press for someone with a small apartment?

Leave a Comment

All comments are reviewed prior to publication. Your email address will not be displayed. Fields marked * are required.