Reputation: 2088
In some templates I see some developers use font-size
property look like this:
font-size:1em/2em
What does it mean ?
I think the 1em is min-font-size
and 2em is max-font-size
Is it true ?
Upvotes: 4
Views: 4492
Reputation: 2700
It seems this:
Use:
font: 1em/1.5em bold italic serif;
instead of
font-size: 1em;
line-height: 1.5em;
font-weight: bold;
font-style: italic;
font-family: serif;
it's CSS shorthand properties
Upvotes: 4
Reputation: 1443
When the units are specified in em or ex, the size is defined relative to the size of the font on the parent element. For example, 0.5em is half the font size of the parent of the current element. Referred https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
Upvotes: 0