An Interest In:
Web News this Week
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
February 8, 2017 10:34 pm GMT
Original Link: http://allthingssmitty.com/2017/01/30/nope-nope-nope-line-height-is-unitless/
Unitless or not unitless?
You should always specify line-height as a unitless number (say this into the mirror five times). That way descendent elements that specify a different font size will inherit that number instead of a fixed line height.
Counterpoint in the comments by David Khourshid:
Unitless line heights are fine, but aren't the only way to use it. If I want an exact, perfect vertical rhythm implemented in my stylesheets, I would absolutely use a line-height *with a unit* …
Unitless or not unitless? is a post from CSS-Tricks
Original Link: http://allthingssmitty.com/2017/01/30/nope-nope-nope-line-height-is-unitless/
Share this article:
Tweet
View Full Article