-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Open
Description
Feature request summary
A special check to not recommend font-display: swap
for icon fonts.
What is the motivation or use case for changing this?
There seems to be no clear recommendation on what is actually best practice for icon fonts, and even if there is, it's not swap
but actually block
. So I would suggest either adding a special rule to to detect icon fonts or maybe whitelist the most common ones so they don't trigger the lighthouse warning when swap
is not set.
Relevant links:
- Lighthouse Issue with Font Performance for font-display FortAwesome/Font-Awesome#14387
- https://www.zachleat.com/web/font-display-icon-fonts/
- https://stackoverflow.com/questions/49461308/correct-font-display-value-for-icon-fonts
How is this beneficial to Lighthouse?
Currently the Lighthouse recommendation is not actual the best practice and might cause people blindly following it to get unintended behaviour.
coliff, craze3, benoitemile, gkalpak, dkniffin and 1 more