composerMike composerMike -4 years ago 58
CSS Question

Is there a shortcut for importing all weights of a Google font?

In a CSS file, I'd like to @import all weights and styles of a google font, say Roboto or Roboto Slab, for experimentation. Later I can trim to a list of only needed styles. Is there a shortcut, rather than putting the entire list in the @import?

Answer Source

Unfortunately there's no way for that, you need to import one by one. You may try import the font by media link setting the weights you want after the font's name as follows:

<link href=",600,700" rel="stylesheet">

Note: Web fonts cant really slow down your site, try import only what is needle.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download