Reputation: 784
Watch the gap between <h1>Jedálny lístok</h1>
and <h2>A</h2>
line-height: 1.5;
not equal to line-height: 1.5em;
With
body {
line-height: 1.5;
}
Without
Upvotes: 0
Views: 108
Reputation: 391
In the case of inherited values, line-height: 1.5 is not equal to line-height: 1.5em; For example if an inner element has twice the font size of its parent, then the inherited value 1.2 means that 1.2 times its own font size is used.
Upvotes: 0
Reputation: 11983
/* Keyword values */
line-height: normal;
/* Unitless: use this number multiplied by the element's font size */
line-height: 3.5;
/* <length> values */
line-height: 3em;
/* <percentage> values */
line-height: 34%;
/* Global values */
line-height: inherit;
line-height: initial;
line-height: unset;
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#Syntax
Upvotes: 1