Quick Win

Trim unwanted spacing from text edges

Remove extra space above/below text caused by font metrics.

Est. 1 min readIntermediate

Published

Remove extra space above/below text caused by font metrics.

h1 {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

Gives you tighter, more predictable spacing for headings and UI text.

typography · intermediate