Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@olback Wrong! Line height is supposed to be unit less. So 'line-height: 1.4;' would be correct. That way, it is actually relative to the true height of the font!
-
rjedlin4517y@RantingJoe That is incorrect. An em is the width of the m character in the font you're working with.
-
rjedlin4517y@RantingJoe What the heck you're right! Em just feels like a wrong name for line height. Questionable decision (though w3c makes plenty of them)
-
@RantingJoe
"Unitless line heights are recommended due to the fact that child elements will inherit the raw number value, rather than the computed value."
https://css-tricks.com/almanac/...
Related Rants
Dear web developers, whenever there is more than ONE LINE OF TEXT make sure the line-height is 1.4em.
rant
please
it's not that hard
one line to keep visitors