1.2em is generally wrong, though in simple cases it can be the same as a plain 1.2. But the latter is inherited as a factor relative to whatever font is in use when it’s rendered, and will scale properly. The “em” version is inherited as an absolute size (calculated from the font it was originally applied to), so will be way off if your main body text style applies a font-size in a separate (more deeply nested) rule than the line-height was.
Especially in a body rule (and usually everywhere), use plain 1.2 unless you really know what you’re doing.
The Mozilla link deback posted has a good illustration of this at the bottom.
EDIT: What GeoffR just said.
Last edited by sjfan; 02-10-2018 at 10:16 PM.
|