Vertical rhythm using CSS lh and rlh units

PHOTO EMBED

Tue Mar 05 2024 15:34:14 GMT+0000 (Coordinated Universal Time)

Saved by @Sebhart #css #typography #layout

html {
  font-size: 100%;
  line-height: 1.5;
}

main {
  padding: 1rlh; /* 🫶 */
}
content_copyCOPY

lh and rlh, which are equal to the computed line-height of the element on which it is used and the root element, respectively.

https://pawelgrzybek.com/vertical-rhythm-using-css-lh-and-rlh-units/