Last Updated: February 25, 2016
·
319
· tnypxl

Force line-height of parent

It's really simple and is something that has eluded me for years as CSS developer.

p {
  line-height: 20px;
}

p span {
  line-height: 1;
}

Unitless values are basically presets for single-spacing, double-spacing, so on and so forth. 1 is single-spacing which inherits whatever line-height the parent sets.