tags:

views:

372

answers:

2

What does the slash mean here: "font-size: 100%/120%"?

+15  A: 

This actually sets two properties and is equivalent to:

font-size: 100%;
line-height: 120%;

Don't ask me why this particular shortcut exists, though.

Konrad Rudolph
It's to mirror old typesetting syntax, where you'd have font set as, for instance "10pt on 12pt", or "10pt/12pt".
David M
+1 to correct answer and a meta +1 to history lesson :)
Darko Z
+4  A: 

Konrad got this one, but there are a lot of CSS shorthand properties like this that you can use to shorten your style sheets. Some of them look a little cryptic if you're not aware of them.

Bill the Lizard
Most shorthands address related style properties, though (e.g. `border-*`). David has given a good explanation in the comments to my answer. As to shorthands being cryptic: certainly true, but so damn useful and quite easy to learn.
Konrad Rudolph