Re:How to avoid layout shifts caused by web fonts
by maccard on Sunday January 30, 2022 @11:56AM
(#30138754)
If you care that much you need to bundle the font with your site.
Re:How to avoid layout shifts caused by web fonts
by capableweb on Monday January 31, 2022 @07:15AM
(#30147133)
Yeah, I mean... Yeah. How is that an argument for just using `body {font-family: sans-serif}`?
In those cases, using whatever font is usually not good enough, because many of them have different sizes (both length-wise, height-wise and line-height-wise), so if a user gets a different font loaded than what you have tested with, it could at best just have a different size (right-side of the text is now 3px away from the side rather than 6px for example) and at worst introduce line-breaks in your buttons that only expects one line of text, making everything look very fugly.