Type Scale

Pick a base size and ratio. Get a complete typography scale with fluid clamp() values, line heights, and exportable code.

16px
-2|5+
viewport:px

Scale Preview

4xl40px
The quick brown fox jumps over the lazy dog
3xl33px
The quick brown fox jumps over the lazy dog
2xl28px
The quick brown fox jumps over the lazy dog
xl23px
The quick brown fox jumps over the lazy dog
lg19px
The quick brown fox jumps over the lazy dog
body16px
The quick brown fox jumps over the lazy dog
caption13px
The quick brown fox jumps over the lazy dog
sm11px
The quick brown fox jumps over the lazy dog

Values

Labelpxremline-heightratioclamp()
sm11.10.6941.60.694clamp(0.521rem, 0.463rem + 0.29vw, 0.694rem)
caption13.30.8331.60.833clamp(0.625rem, 0.556rem + 0.35vw, 0.833rem)
body(base)16.01.0001.61.000clamp(0.750rem, 0.667rem + 0.42vw, 1.000rem)
lg19.21.2001.51.200clamp(0.900rem, 0.800rem + 0.50vw, 1.200rem)
xl23.01.4401.51.440clamp(1.080rem, 0.960rem + 0.60vw, 1.440rem)
2xl27.61.7281.31.728clamp(1.296rem, 1.152rem + 0.72vw, 1.728rem)
3xl33.22.0741.32.074clamp(1.555rem, 1.382rem + 0.86vw, 2.074rem)
4xl39.82.4881.22.488clamp(1.866rem, 1.659rem + 1.04vw, 2.488rem)

Rhythm Preview

Headline with purpose

A subtitle that supports the headline without competing for attention

Body text at your base size. This is where most reading happens. The scale should make this size comfortable, with headings above that feel proportionally heavier and captions below that recede without disappearing. Good typography is invisible — the reader notices the content, not the type.

Caption or fine print at the smallest scale step. Still legible, but clearly subordinate.

Export

prefix:
:root {
  --font-sm: clamp(0.521rem, 0.463rem + 0.29vw, 0.694rem);
  --font-caption: clamp(0.625rem, 0.556rem + 0.35vw, 0.833rem);
  --font-body: clamp(0.750rem, 0.667rem + 0.42vw, 1.000rem);
  --font-lg: clamp(0.900rem, 0.800rem + 0.50vw, 1.200rem);
  --font-xl: clamp(1.080rem, 0.960rem + 0.60vw, 1.440rem);
  --font-2xl: clamp(1.296rem, 1.152rem + 0.72vw, 1.728rem);
  --font-3xl: clamp(1.555rem, 1.382rem + 0.86vw, 2.074rem);
  --font-4xl: clamp(1.866rem, 1.659rem + 1.04vw, 2.488rem);
}

/* Line heights */
:root {
  --font-sm-lh: 1.6;
  --font-caption-lh: 1.6;
  --font-body-lh: 1.6;
  --font-lg-lh: 1.5;
  --font-xl-lh: 1.5;
  --font-2xl-lh: 1.3;
  --font-3xl-lh: 1.3;
  --font-4xl-lh: 1.2;
}