fonts with option `download: true` ignore `display` (always are 'block')
See original GitHub issueFonts downloaded always seem to be font-display: block;
and ignore the display
option.
googleFonts: {
display: 'swap', // 'auto' | 'block' | 'swap' | 'fallback' | 'optional'
download: true,
families: {
Inter: {
wght: [200, 300, 400, 500, 600, 700],
},
Montserrat: {
wght: [200, 300, 400, 500, 600, 700],
},
}
}
Resulting in following css:
Or is there any rationale for enforcing ‘block’ for downloaded fonts?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
A New Way To Reduce Font Loading Impact: CSS Font ...
With this option, we avoid both FOIT and FOUT by basically only using fonts that have already been downloaded. If the web font...
Read more >The Best Font Loading Strategies and How to Execute Them
First, we want to load our fonts as usual via @font-face . The font-display: swap property is optional since we're loading fonts via...
Read more >How to avoid layout shifts caused by web fonts - Simon Hearne
Use display:block and match the fallback font as closely as possible to your web font. Option 1 would need a lot of testing...
Read more >The Ultimate List of Web-Safe HTML and CSS Fonts
Discover the best web-safe HTML and CSS fonts to use for your website, so you can be sure your text will display properly...
Read more >Can't find web fonts options in Firefox 62 - Mozilla Support
I am certain I found a clear option the other day to disable web fonts and selected that. I have many sites showing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @hartmut-co-uk
Please try v3.0.0-1
Many thanks, I can confirm everything works as expected with
v3.0.0-1
. Even without specifyingoverwriting
option changes are detected and applied. 👍