Fix font-display for Google Fonts#2588
Fix font-display for Google Fonts#2588SEWeiTung merged 1 commit intonodejs:masterfrom csabapalfi:fix/font-display
Conversation
|
I thought they have a default which is swap, so this change seems redundant? https://css-tricks.com/google-fonts-and-font-display/ Also, Source Sans Pro is used everywhere. |
|
It's not default unfortunately. Try comparing the response to these: |
|
Removed this from the PR description as @XhmikosR confirmed the font is used everywhere. |
|
Might be the default in the snippet they offer when copying. If so then this change makes sense. Personally I tend to use |
|
Happy to change to |
|
Changed to |
|
I don't mind either way personally, I was just saying what I use most of the time :) Either way, it's an improvement for sure. |
|
@nodejs/website |
|
@csabapalfi: can you make the same change in core? |
The relevant file is https://github.com/nodejs/node/blob/master/doc/template.html. |
|
Yeah, I know, but I thought someone else could tackle this. :) No worries, I'll make a PR myself. |
|
@XhmikosR you beat me to it! Great stuff! Thanks for pushing this ahead! |
Oh, I was actually nothing that for @csabapalfi's benefit, but whatevs, as long as it gets updated, I don't really care who does it. :-D |
Google Fonts shipped the display flag in May: https://addyosmani.com/blog/google-fonts-font-display/
This PR makes use of that new feature to add
font-display: fallbackin Google Fonts CSS via thedisplay=fallbackquery param.This will remove the following error under
Diagnosticsin Google PageSpeed Inisghts: https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fnodejs.org%2Fen%2F