You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per font all values except for the line height are constant. So it would be possible to replace the fixed em values used as negative margins with a calc() using the lh unit.
This way the rules inside ::before and ::after would be font-size and line-height independent and would also allow other units like rem for font-sizes.
The overall support for the lh-unit is quite good, but can't be considered universally available.
(Alternatively, to widen support, it can be considered to use a custom property for the line height.)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Per font all values except for the line height are constant. So it would be possible to replace the fixed em values used as negative margins with a
calc()using thelhunit.where
This way the rules inside ::before and ::after would be font-size and line-height independent and would also allow other units like
remfor font-sizes.Here is a codepen demo:
https://codepen.io/2pinch/pen/VYZNGRy
The overall support for the lh-unit is quite good, but can't be considered universally available.
(Alternatively, to widen support, it can be considered to use a custom property for the line height.)
All reactions