> All in One 586: `lh` and `rlh` units

Ads

Tuesday, May 5, 2020

`lh` and `rlh` units

There’s some new units I was totally unaware of from the Level 4 spec for CSS values! The lh unit is “equal to the computed value of line-height” and rlh is the same only of the root element (probably the <html> element) rather than the current element.

Why would that be useful? Šime Vidas’ has a strong point:

“Vertical Inline Centering” of an icon
.inline-icon {
  display: inline-block;
  width: 1lh;
  height: 1lh;
}

The post `lh` and `rlh` units appeared first on CSS-Tricks.



from CSS-Tricks https://ift.tt/2W727qf
via IFTTT

No comments:

Post a Comment

Thunderstorms Early today!

With a high of F and a low of 62F. Currently, it's 72F and Thunderstorm outside. Current wind speeds: 11 from the Southeast Pollen...