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(docs-infra): add swap to web fonts so downloading does not block… #35352
Conversation
You can preview 4d879e9 at https://pr35352-4d879e9.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, @ajitsinghkaler 👍
Please change the commit message to have fix
as scope: fix(docs-infra): ...
aio/src/index.html
Outdated
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono&display=swap"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons&display=swap"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an icon font, I don't think it makes sense to show a fallback font.
c666a92
to
26a452a
Compare
You can preview 26a452a at https://pr35352-26a452a.ngbuilds.io/. |
@gkalpak made the changes please have a look |
aio/src/index.html
Outdated
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Sans+Mono&display=swap"> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, based on this thread (and mentioned resources), I think display: block
is the appropriate value for icon fonts (which will also make LightHouse happy):
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons&display=block"> |
…ock rendering Light house was reporting that 'Ensure text remains visible during webfont load' solution to this problem was adding &swap to the end of web fonts this leads to our first text showing before web-font download and improves the performance of site link to article: https://web.dev/font-display/\?utm_source\=lighthouse\&utm_medium\=lr
26a452a
to
5ba991f
Compare
You can preview 5ba991f at https://pr35352-5ba991f.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
…ock rendering (#35352) Light house was reporting that 'Ensure text remains visible during webfont load' solution to this problem was adding &swap to the end of web fonts this leads to our first text showing before web-font download and improves the performance of site link to article: https://web.dev/font-display/\?utm_source\=lighthouse\&utm_medium\=lr PR Close #35352
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
… rendering
Light house was reporting that 'Ensure text remains visible during webfont load' solution to this was adding & swap to the end o web fonts this leds to our first text showing before web-font download and improves the performance of out site link to article: https://web.dev/font-display/\?utm_source\=lighthouse\&utm_medium\=lr
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Web fonts block rendering.
Issue Number: N/A
What is the new behavior?
Web fonts won't block rendering while downloading.
Does this PR introduce a breaking change?
Other information