bokmann / font-awesome-rails

the font-awesome font bundled as an asset for the rails asset pipeline
http://fortawesome.github.com/Font-Awesome/
MIT License
1.86k stars 244 forks source link

Add font-display: block to font face declaration #207

Open PikachuEXE opened 4 years ago

PikachuEXE commented 4 years ago

Lighthouse is warning about it and some browsers would use incorrect behaviour (swap) if auto or nothing provided Issue on FA: https://github.com/FortAwesome/Font-Awesome/issues/16077

Change already scheduled for FA 5.12.2 https://github.com/FortAwesome/Font-Awesome/issues/16077#issuecomment-594581049

firedev commented 3 years ago

That's interesting. I proposed swap, but yeah, maybe block is better.

ABrisset commented 3 years ago

Hi, I was about to create a new pull request about this subject also. I suggest "font-display: swap", as it is recommended by Google here https://web.dev/font-display/?utm_source=lighthouse&utm_medium=devtools#how-to-avoid-showing-invisible-text Problem with "font-display: block" is that it may delay FCP. What do you think ?