Why can't the User Agent allow the user to set themes, with some sensible defaults provided? There should be a background color, foreground (text) color, a few accent colors, etc. Custom themes should only be used by applications which have really different requirements; background/foreground/accents/good-bad-error colors should be enough for 95% of them and the other 4% can interpolate to get more colors. This also helps people with special needs such as colorblindness (almost 10% of men) and poor eyesight.
For example, on KDE I can set a system-wide color scheme applied to Qt (and also attempted to apply to GTK) applications. It comes with a pretty good default light and dark theme, but the user can get any custom theme they want or make their own. It seems to work just fine here, with a wide variety of applications looking great even with nonstandard themes.
Of course HTML/CSS has been evolving for many decades, but there needs to be a reset at some point where we switch from legacy technology designed to make reading documents to a new system that is useful for making web applications and interactive documents.
One thing I've done on my browser is to disable custom fonts. Font CSS is ignored; all webpages render with GNU FreeFont (sans + serif; sans is very similar to San Francisco / Helvetica) and Fira Code. It looks great; once in a blue moon I find a page where typography is the focus of the page and in those instances I copy the URL into another browser. When I occasionally use that other browser for normal browsing, the presence of custom fonts makes me feel the same way as when you turn off an ad blocker and surf the web - it's absolutely disgusting. There's no reason to allow companies to push their ridiculous branding styles down our throats.
An idea I just had is to make a browser addon which automatically tries to do this - every element's color value is categorized as light, dark, accent, etc. and then gets replaced by the user-configured theme.
https://www.w3.org/TR/coga-gap-analysis/#personalization-and...
However, personalization doesn't work well with the current system of CSS. No page (I know of) has a stable CSS that would enable personalization to any meaningful degree.
> There's no reason to allow companies to push their ridiculous branding styles down our throats.
Understandable, but on the contrary, you can imagine complaints on the opposite end of the spectrum. "Man, their site is ugly!"
Designers do their best to understand and create experiences that are crafted to their target audience; to, well, varying degrees of efficacy.
W.R.T. your other point, my argument was that people should be able to use their own themes but then it becomes the responsibility of the User Agent vendor to provide a great default one. While Mac doesn't allow custom themes, they have made this work pretty well with a switchable light/dark theme. All apps using the native widgets look beautiful; each app designer just has to put UI elements in the right place and make them behave nicely with user expectations. I don't use macOS personally so I don't know how this works with nonnative apps, but on the browser we have a single language set (HTML/CSS) with tags for everything already (button, progress, various text input, radio/checkbox, etc.) so that's not an issue.
In my previous post I alluded to replacing HTML/CSS but that seems unnecessary. Currently CSS is used for both styling and layout/positioning. If User Agents provide a great default style then users can strip out the CSS styles, the same way users can disallow custom fonts after specifying a good default font in the UA settings. And when UAs become responsible for styling, it's only natural that the more feature-rich UAs would allow users to configure the entire theme.
Determining which parts of CSS are style and which are layout might be a bit difficult, but can't be too hard. Eventually people will start using CSS for layout only and stop putting style in CSS, which solves the problem. The only possible issue is that companies still want to shove their branding down our throats instead of letting us use a native-looking or otherwise preferred theme. In which case... fuck 'em. I'll block it the same way I block their shitty fonts.
I think you'll be happy to learn about prefers-color-scheme: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...
Chrome hasn't implemented it yet (Firefox and Safari did), but there's some activity here: https://bugs.chromium.org/p/chromium/issues/detail?id=889087
As far as I understand it, a website would have two stylesheets (dark and light) and your browser would pick which one should be used. Websites would still have two themes, but the activation process would get automated. This would allow the browsers to finally implement a "I prefer dark themes" setting.