New CSS units, lh and rlh, introduced in 2023, enable precise control over typography by referencing line heights. These units help make layouts appear more polished by aligning sizes to the vertical rhythm of the text. They offer widespread browser support and can be used for margins, padding, gaps, and other layout measurements. Progressive enhancement techniques can ensure good user experience across different browsers.
Table of contents
Line height unitsTry it yourselfBrowser supportTake your typography to the next levelSort: