How upset would you be if web browsers changed the default `font` fallback style to `sans-serif` instead of `serif`?
49 replies
@zachleat is `fantasy` not an option?
@mattdsteele `fantasy` is a collective hallucination, like the american dream or a fast react web site
@zachleat That's an instant follow 😂
@MichalBryxi 🙌🏻🙌🏻🙌🏻
for this to happen without breaking the web they’d need to use a sans-serif metric-compatible version of `serif` (`sans-serif` is not this)
@zachleat Wait, how can this ever work? Doesn't that resolve to different fonts depending on browser, OS etc?
why is this necessary?
been developing with web techs since the 1990s (yes, literally since i got hold of Mosaic sometime in 1994-1995) because am dyslexic and have spent an inordinate amount of decades finding the right combination of fonts and css to attend to my dyslexia needs.
i wouldn't care from that perspective given i change all my browsers and create very intentional CSS themes for my web projects, but it would irritate me with the random browser i couldn't control
@blogdiva are you asking why metric-compatibility is a necessity? I’d bet there are a lot of web sites that rely on fixed sizing of default fonts
@zachleat had to re-read your ¿? and, yup, read it backwards. sorry about that. my dyslexia swaps whole words. misunderstood it as sans-serif the default and changing it to serif.
been changing fonts for so long, didn't remember serif is the default. back in the day, screen dottiness made it hard for me to read most serif body.
there's another reason for my hating serifs for body: 16px is too small. ligatures blend at that size. i prefer serifs for headings, sidebars, even emphasis.
@zachleat I clicked your code pen and got four of the same font—all sans serif.
I'm on Firefox Nightly for Android.
@webbureaucrat that means your fallback is already sans-serif! I pushed a change to make the test more explicit for you
@zachleat I'm curious about the ‘breaking the web’ part. `serif` and `sans-serif` are fallbacks for otherwise unstyled text, so… what would there be to break? 🤓
@colepeters if a web site relied on the fallback as serif, it could potentially break if the default changed to sans-serif (especially since sans-serif seems to be wider)
@zachleat I suppose if a layout was strictly dependent on the specific fallback's metrics? But even then, that layout would only be 'not broken' on platforms that made that specific fallback available 😅 (I realize this is all hypothetical and I don't have a strong opinion on it changing, just wanted to understand your point better)
@colepeters I’m not sure we’re quite connecting on the point
If a serif label on a navigation menu suddenly changed to sans-serif, the assumptions about the dimensions at which it was coded (especially for responsive design breakpoints or text overflow) would change. Of course this would only impact sites that did not have font-family application styles but that’s certainly more than zero and would still count as breaking the web
@zachleat
Big nope. Sites that relies on font metrics keeping the same has allways been broken on every computer except possibly on the specific client / version / desktop / settings the developer / tester has used.
@zachleat I much prefer serif fonts. I find them easier to read (Al vs. AI etc.) and we now have high-resolution displays everywhere so that they always look good.
My impression is that sans-serif fonts were a trend a while ago but that seems to be changing.
@rauschma serifs are still dominating most long-form reading so surely there’s some truth to that
@zachleat Genuinely curious where things will go in the future—ATM sans-serif fonts still dominate user interfaces.
I personally like Palatino: https://exploringjs.com/js/book/ch_new-javascript-features.html#ch_new-javascript-features
@rauschma your web site genuinely has a great and unique typeface brand to it!
Now I’m curious to look into monospace serif fonts for code—are those a thing?
@zachleat
“Serif fonts for coding” by @george
https://www.georgeho.org/fonts-for-coding/– Could also work as a coding font: https://fonts.google.com/specimen/Courier+Prime
– Interestingly, even sans-serif coding fonts tend to add serifs to (e.g.): 1, I, l@zachleat @george @rauschma
My favorite serif typeface for coding is Input Serif by @djrrb
https://input.djr.com
@zachleat @rauschma I'm a big fan of "Go Mono" for code https://go.dev/blog/go-fonts
@zachleat Yes, but counterpoint: how else would I know my CSS it totally borked?
(I actually have noticed a font failing to load thanks to this in a recent project, so I'm only half joking)
@chriskirknielsen hah! Countercounterpoint your CSS is never borked if you use serif
@zachleat make it system-ui and you’ve got yourself a deal
@liamnewmarch now we’re talking
@zachleat Why wait? You can make your default font MS Comic Sans now!
(This also means: If any websites break when a browser changes the default fallback font, they are already broken for any users who are fussy about typography.)
@AmeliaBR this seems like a good time to me
@zachleat the ugly default font tells me what i havent styled yet
@zachleat I have my default browser set to comic sans as a way of noticing if I’ve accidentally left something on the page unstyled. Always amusing when you double take on a big famous website with some comic sans.
All of which to say, changing to a sans fonts in general I’m fine with, but sans-serif itself seems a little not-fun-enough, don’t you think?
@zachleat Every historical website and HTML document that didn’t specify a font would look different from the way it did when it was authored. I don’t like that idea.
Plus, as in vogue as sans-serifs are, serifs are still better for reading long text (for most people).
Is there a good reason to do this? Is it just because sans-serifs are cool? Might as well make browsers default to white text on black since everybody’s also obsessed with dark mode these days.
@zachleat I wouldn't be upset, but it is a (visual) breaking change. Why would browsers do that? Same if they change the default serif font itself.
@dutchcelt I would assume that they wouldn’t do it!
-
@pascal I was a little proud at what I felt like was a novel polling method, thank you 😅
@zachleat These currently vary by script (Latin, Cyrillic, Greek, Arabic, Hebrew, etc.) See example of Firefox defaults at https://searchfox.org/mozilla-central/rev/4e0f4c612589c23344f22285520a44a3f45c9e6e/modules/libpref/init/all.js#2009-2155
-