thelolcat
thelolcat

Reputation: 11545

Font short syntax for google fonts

For google fonts the font-family and font-weight are variables. The short syntax should be

font: 400 "Open Sans", Helvetica, Arial, sans-serif;

But I get invalid property value,

Is there a way to declare just font-weight and font family in the short version? I want everything else to stay as it is (font style etc)

Upvotes: 1

Views: 316

Answers (1)

myKaUs
myKaUs

Reputation: 54

I believe the font-size must be specified when using font shorthand.

font: 400 12px "Open Sans, Helvetica, Arial, sans-serif;

See http://www.impressivewebs.com/css-font-shorthand-property-cheat-sheet/ and http://www.w3.org/wiki/CSS/Properties/font

You'll need to use the good old font-weight and font-family instead of the shorthand.

Upvotes: 1

Related Questions