← All Exercises

Fluid Typography with Clamp

intermediatecss~15min

Background

Fluid typography eliminates discrete breakpoint jumps for font sizes.

Problem

Create responsive font sizes that scale smoothly between minimum and maximum values using clamp.

Input

Min and max font sizes

Output

Smoothly scaling text

Sample tests

Sample 1

Input: clamp(1rem, 4vw, 3rem)
Expected: fluid font size

Your solution

Learning objective

Learn fluid design and the clamp function