rex or ex for CSS line-height
Adam Argyle wrote “New CSS Relative Units”, totalling CSS units to 50! In his voice, "pretty rad".
Me? I'm excited about the root x-height, rex. The ascending factor makes it a nice addition to the existing ex unit. It should ease the process of creating vertical rhythm across columns of headlines, paragraphs, and other elements with varying font sizes.
Moreover, this family of vertical font sizing units, ex and rex, is intuitive to setting line heights.
It feels unsemantic to me making line-height relative to, for example, the width of the font's letter "m". Which is what we do setting line-height with the values: 1.6, 1.6em, or 1.6rem.
What feels semantic to me is setting line-height relative to the x-height. Which we can do with a line-height of 3ex or 3rex. Where 3 didn't come from nowhere but equivalent to the 3 rows of a glyph; the ascender height, the x-height, and the descender height.
A line height of 3ex makes a good default for body fonts. Because their ascender and descender heights are usually shorter that the x-height. Making the cumulative negative spaces a good leading. A line-height of 3ex also makes a good basis to account for wider or shorter measure, display or caption fonts, and other possible conditions.
I look forward to experimenting with this on toheeb.com/