Skip to content
Aito

All tools / 06 Fonts

Font size scale

A type scale gives every size on a page a fixed relationship, so headings and text feel consistent. Pick a base size and a ratio, and get the sizes as CSS.

  • 5xl61pxWhereas disregard and contempt
  • 4xl48.8pxWhereas disregard and contempt
  • 3xl39.1pxWhereas disregard and contempt
  • 2xl31.3pxWhereas disregard and contempt
  • xl25pxWhereas disregard and contempt
  • lg20pxWhereas disregard and contempt
  • base16pxWhereas disregard and contempt
  • sm12.8pxWhereas disregard and contempt
  • xs10.2pxWhereas disregard and contempt

The preview shows the small-screen size, capped at 90 px so it fits.

CSS variables

CSS variables
:root {  --text-xs: 0.64rem;  --text-sm: 0.8rem;  --text-base: 1rem;  --text-lg: 1.25rem;  --text-xl: 1.563rem;  --text-2xl: 1.953rem;  --text-3xl: 2.441rem;  --text-4xl: 3.052rem;  --text-5xl: 3.815rem;}

Tailwind v4 theme

Tailwind v4 theme
@theme {  --text-xs: 0.64rem;  --text-xs--line-height: 1.5;  --text-sm: 0.8rem;  --text-sm--line-height: 1.5;  --text-base: 1rem;  --text-base--line-height: 1.5;  --text-lg: 1.25rem;  --text-lg--line-height: 1.3;  --text-xl: 1.563rem;  --text-xl--line-height: 1.3;  --text-2xl: 1.953rem;  --text-2xl--line-height: 1.15;  --text-3xl: 2.441rem;  --text-3xl--line-height: 1.15;  --text-4xl: 3.052rem;  --text-4xl--line-height: 1.15;  --text-5xl: 3.815rem;  --text-5xl--line-height: 1.15;}