Typography
Astro typography is built using a modular scale. We use the Major Second (1.125) scale with a var(--) base-font-unit
Font Sizes
One ring to rule them all
var(--)font-size-xs13px / 0.8125remOne ring to rule them all
var(--)font-size-sm14px / 0.875remOne ring to rule them all
var(--)font-size-base16px / 1remOne ring to rule them all
var(--)font-size-lg18px / 1.125remOne ring to rule them all
var(--)font-size-xl20px / 1.25remOne ring to rule them all
var(--)font-size-2xl23px / 1.4375remOne ring to rule them all
var(--)font-size-3xl26px / 1.625remOne ring to rule them all
var(--)font-size-4xl29px / 1.8125remOne ring to rule them all
var(--)font-size-5xl32px / 2remOne ring to rule them all
var(--)font-size-6xl36px / 2.25rem
Line Height
Use our line height tokens for better control over paragraphs or content that spans multiple lines.
“You cannot pass,” he said. The orcs stood still, and a dead silence fell. “I am a servant of the Secret Fire, wielder of the flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udûn. Go back to the Shadow! You cannot pass.”
1var(--)line-height-none“You cannot pass,” he said. The orcs stood still, and a dead silence fell. “I am a servant of the Secret Fire, wielder of the flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udûn. Go back to the Shadow! You cannot pass.”
1.25var(--)line-height-tight“You cannot pass,” he said. The orcs stood still, and a dead silence fell. “I am a servant of the Secret Fire, wielder of the flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udûn. Go back to the Shadow! You cannot pass.”
1.5var(--)line-height-normal“You cannot pass,” he said. The orcs stood still, and a dead silence fell. “I am a servant of the Secret Fire, wielder of the flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udûn. Go back to the Shadow! You cannot pass.”
1.625var(--)line-height-relaxed“You cannot pass,” he said. The orcs stood still, and a dead silence fell. “I am a servant of the Secret Fire, wielder of the flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udûn. Go back to the Shadow! You cannot pass.”
2var(--)line-height-loose
Font Size / Line Height Pairings
Line height values are unitless to scale with the font size. However, at larger font sizes, manually adjust the line height using the following pairings.
Font Size | Line Height |
---|---|
var(--) font-size-xs | var(--) line-height-normal |
var(--) font-size-sm | var(--) line-height-normal |
var(--) font-size-base | var(--) line-height-normal |
var(--) font-size-lg | var(--) line-height-normal |
var(--) font-size-xl | var(--) line-height-tight |
var(--) font-size-2xl | var(--) line-height-tight |
var(--) font-size-3xl | var(--) line-height-tight |
var(--) font-size-4xl | var(--) line-height-tight |
var(--) font-size-5xl | var(--) line-height-tight |
var(--) font-size-6xl | var(--) line-height-tight |