-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix font-display for Google Fonts #2588
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: fallback
in Google Fonts CSS via thedisplay=fallback
query param.This will remove the following error under
Diagnostics
in Google PageSpeed Inisghts: https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fnodejs.org%2Fen%2F