Change default setting from 'optional' to 'swap' for display
#27
Replies: 4 comments
-
Do want to add: thanks for this module. Works like a charm after I configured my display setting |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for your interest in this module. Since this is not a Also, option The But I'm open for disscussion.
Why you think that it's a less error-prone? I don't agree with this. It is simple, if you specified a local font, it loads it according to the defined rules, you have all control. Think of it in a way that if you are a beginner and you specify a local font, after each page load, a short flash and a quick font change occur. You might also think something is wrong, right? Official docs for font-display. |
Beta Was this translation helpful? Give feedback.
-
Fair point. It does make it feel like a 'bug' in that case when the font flashes. However, my view was that I'd rather see a flash than the font not showing up on some devices and guessing where it went wrong. One occasion would be that the server did not load the fonts properly on some devices. I do note that I can't come up with an example where this would occur. Anyway, I do think most of the confusion came from that I was used to |
Beta Was this translation helpful? Give feedback.
-
Yes, I think that is the most common example for
This behavior can also occur if If others bump into this discussion and express a desire to change the option, I'm willing to change the default, but that would probably be a breaking change at this point.
Yes, but thanks for the suggestion anyway, feedback is helpful. |
Beta Was this translation helpful? Give feedback.
-
Steps to Reproduce
Use a local font without setting the display property
Current Behavior
The default value is 'optional' and so the font is loaded with
font-display: optional
Expected Behavior
Because of other modules &
swap
being kind of the standard value around. Therefore, I would expectswap
to the default valueAdditional Details
As explained in the expected behaviour part, I expected the default to be
swap
and probably misread the documentation at first. As a result, I spent quite a lot of time debugging and thinking about why my fonts wouldn't load on some devices from clients. In general, I think swap is more used and has a less 'error-prone' behaviour.I know it is a small thing, but I think it would improve the default usage of the configuration (and some headaches for people who encounter the same situation as me.)
Version
2.3.5
Beta Was this translation helpful? Give feedback.
All reactions