Closed Johnrobmiller closed 8 months ago
Hi, that's a great idea to add some comment.
I use font display optional to optimize for performance, but definitely there will be a case that they need block to preserve design https://web.dev/font-best-practices/#choose-an-appropriate-font-display-strategy
Feel free to open up a PR, thanks!
I think it's very questionable to default to optionally displaying the fonts by setting
font-display
tooptional
in the@font-face
inglobals.css
. I know that onlyInter
is set tooptional
, but devs often copy/paste the whole@font-face
that's in the template when importing their own fonts, trusting it will work for them, and thefont-display
property comes along with it.You really would be required to give zero fucks about the design of your app/site to be ok with not loading your fonts to save the tiny sliver of time it takes to load them. Also, if you are working with a designer, setting the fonts to
optional
is just downright disrepectful, it's like you are saying "I know you problably carefully picked out these fonts for this design, but I don't care and I'm going to optionally load them anyways."The default for the
font-display
value should not beoptional
. Maybeblock
? Or, maybe keep it soptional
but add a helpful comment?