This is very easy. A line-height with unitless value rappresent the ratio based on the element font-size computed value (or inherited) and allows children to compute their line-height based on their font-size.
Ps: same “quiz” here. allthingssmitty.com/2017/01/30/nop...
It's very easy if you already know how line-height with unit-less value works 😉, but unfortunately most developers go with 2em.
line-height
2em
And the original quiz posted by Kevin Yank here: 3 things (almost) no one knows css
Yes but unitless line height is just one of the accepted value. It’s not a “trick” like the previous quiz.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is very easy. A line-height with unitless value rappresent the ratio based on the element font-size computed value (or inherited) and allows children to compute their line-height based on their font-size.
Ps: same “quiz” here.
allthingssmitty.com/2017/01/30/nop...
It's very easy if you already know how
line-height
with unit-less value works 😉, but unfortunately most developers go with2em
.And the original quiz posted by Kevin Yank here: 3 things (almost) no one knows css
Yes but unitless line height is just one of the accepted value. It’s not a “trick” like the previous quiz.