Skip to content

Commit

Permalink
Merge pull request #92 from vrk-kpa/feature/font-display-swap
Browse files Browse the repository at this point in the history
Use Google Webfont's new feature to set display:swap with query param
  • Loading branch information
J-Kallunki authored May 17, 2019
2 parents e2f4bf9 + fa5a5c8 commit 8152644
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

1. ## Fonts don't seem to be correct

Add `@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600');` to your applications CSS.
Add `@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600&display=swap');` to your applications CSS.

2. ## Content-Security-Policy (CSP) problems?

Expand Down
2 changes: 1 addition & 1 deletion src/core/theme/fontFaces.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600');
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600&display=swap');

/* Google Developers suggests using Lighthouse
* -> Lighthouse warns about not using font-display on loading fonts -> Web page uses Google Fonts the way it's suggested on Google Fonts
Expand Down
2 changes: 1 addition & 1 deletion styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = {
{
rel: 'stylesheet',
href:
'https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700',
'https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700&display=swap',
},
],
},
Expand Down

0 comments on commit 8152644

Please sign in to comment.