Calculate responsive font sizes using clamp(), fluid typography, and modular scales
clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem)
Resize your browser to see the fluid scaling
16px20.8px24pxclamp(1rem, 0.8239rem + 0.7512vw, 1.5rem):root {
--font-size-0: 1rem;
--font-size-1: 1.333rem;
--font-size-2: 1.777rem;
--font-size-3: 2.369rem;
--font-size-4: 3.157rem;
--font-size-5: 4.209rem;
--font-size-6: 5.61rem;
--font-size-fluid: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
}
/* Typography utility classes */
.text-0 {
font-size: var(--font-size-0);
}
.text-1 {
font-size: var(--font-size-1);
}
.text-2 {
font-size: var(--font-size-2);
}
.text-3 {
font-size: var(--font-size-3);
}
.text-4 {
font-size: var(--font-size-4);
}
.text-5 {
font-size: var(--font-size-5);
}
.text-6 {
font-size: var(--font-size-6);
}
Help others discover this tool!