Leading-Trim: The Future of Digital Typesetting

How an emerging CSS standard can fix old problems and raise the bar for web apps

Ethan Wang
Aug 18, 2020 · 9 min read

The problem with text boxes today

How we got here: a history lesson

Leading was split in half and put above and below each line since CSS1. The browser window shown above is Internet Explorer 3.0. IE3 was the first commercial browser with CSS support. The font used is Verdana, released with the Core Fonts for the web project initiated by Microsoft back in 1996. In case you are wondering, the curves in the browser chrome are not a watermark.
The anatomy of your average text box

Workarounds are just workarounds

Introducing leading-trim

h1 { 
text-edge: cap alphabetic;
leading-trim: both;

Leading-trim fixes alignment issues

Other immediate impacts: consistency and workflow improvements

A spacing system applied to text elements without leading-trim 😕

Small change, big implications

Microsoft’s role in this effort

Special thanks

Questions or comments?


Microsoft Design

Stories from the thinkers and tinkerers at Microsoft