Open jeroenb2511 opened 8 years ago
Don't know if it's the official way, but I worked around it by importing the styles using the extraHead
flag
--extraHead "<style>@import url('https://fonts.googleapis.com/css?family=Open+Sans&subset=latin');</style>"
(that's using the CLI, but in gulp there's an extraHead property in the options object used when generating the styleguide)
I tried to do the same way, but it load after the original stylesheet. It doesn't work for me. I didn't find any information about Google Fonts. The documentation describe static fonts and that works fine for me. For now I am searching the best way to enable Google Fonts (if these is possible).
The load order doesn't really matter, the fonts would be rendered once they're loaded. Make sure you're using the right font-family: "Typeface Name";
for the actual typeface you're loading and check the network tab in your browser's dev-tools to see if the fonts ever get loaded. Might be connectivity issues (or plugins blocking the fonts).
@jeroenb2511 Could you share how exactly you are trying to link the font? Are you doing this in the CSS (SASS, LESS) code processed by SC5-StyleGuide?
Try to use beforeBody
build option with link to google font
We are implementing the style guide with Gulp. We aren't able to added the @import Google font. How should we do that?