Dark mode with web standards

(olliewilliams.xyz)

24 points | by thm 7 hours ago

4 comments

  • phyzix5761 30 minutes ago
    > Respecting the user’s OS setting is straightforward: use the prefers-color-scheme media query in CSS.

    Funny that this website does not respect the user's OS settings at all.

  • recursivedoubts 2 hours ago
    i'm sure this is unpopular, but I think dark mode was an (understandable) mistake

    in my made up, undersourced version of tech history, what happened was that the first LCDs that came out were very dim compared to the CRTs they were replacing, which OS makers responded to by going to very bright/white UIs over the previous gray/color schemes that were used and everyone cranked their brightness to 11. Over time LCDs improved and the new white-standard/high brightness regime became untenable for people who were on their screens for long periods of time, which drove the creation of dark mode, first in coding themes and later for the entire OS.

    Dark mode support makes it VERY hard to do a website well because it is almost always going to look mediocre in one mode or the other and it is very easy for a gremlin to sneak in in the mode that a developer isn't using.

    I would love to go back to a gray-base color and use a mildly muted white for a reading background and dark for code/special content. The hyperscript website is kind of a gesture in this direction: https://hyperscript.org/

    • Firehawke 2 hours ago
      As someone who has moderate to fairly heavy lighht sensitivity when I'm not dealing with migraines and extremely heavy light sensitvity with headaches, I'm just going to say that you're absolutely wrong here.

      Not every user has the same physiology. Dark mode is an accessibility option for a fair number of us.

      • loloquwowndueo 1 hour ago
        Can flip this around: lots of websites now default to dark mode because reasons, and dark mode is very difficult for me to read (all blurry, also gives me a headache after a while).
        • acdha 38 minutes ago
          Yes, the correct way to approach this is to make good versions of both and respect the user’s preference. Font size is similar: you’ll never make everyone happy with a single choice so you should respect the user’s ability to know what they need.
        • cassianoleal 1 hour ago
          I think both dark and light modes are an accessibility option.
    • seanwilson 1 hour ago
      Some recommendations based on studies here https://www.nngroup.com/articles/dark-mode/

      > In people with normal vision (or corrected-to-normal vision), visual performance tends to be better with light mode, whereas some people with cataract and related disorders may perform better with dark mode. On the flip side, long-term reading in light mode may be associated with myopia.

      > we strongly recommend that designers allow users to switch to dark mode if they want to — for three reasons: (1) there may be long-term effects associated with light mode; (2) some people with visual impairments will do better with dark mode; and (3) some users simply like dark mode better.

    • al_borland 1 hour ago
      > the first LCDs that came out were very dim compared to the CRTs they were replacing

      Maybe this was true on laptops, but I remember my first experience with an LCD on a desktop was with the G4 iMac in 2003. I remember it came out of the box set to 100% brightness and it hurt my eyes to use it. It took me a little while to figure out how to turn it down so I could use it pain free.

      Before that iMac I had a Thinkpad with Windows 2000, which was very gray. I don’t remember having problems. The shift to white seemed to come after LCDs were already pretty capable.

      In my memory dark mode seemed to come much later, as people would use their smartphones in bed and be blinded by the light coming off a white webpage background. There was a vocal minority that then pushed for dark mode on everything. It is possible that before that was the idea that dark mode would use less energy and we should do it to save the planet. I seem to remember that fad for a while, but don’t recall where it fit in the timeline.

    • cosmic_cheese 36 minutes ago
      I would tie the sudden demand and popularity of dark mode not with LCDs, but with the advent of flat design (Metro, Material, etc), which replaced the midtones of previous themes with stark, blinding whites and scarcely darker grays. The difference is particularly striking in iOS native apps pre and post-iOS 7 — iOS 6 and prior was even more midtone-weighted than its desktop contemporaries.

      I was perfectly happy to use iOS 6, OS X 10.9 Mavericks, and Windows 7 without dark mode on LCDs, outside of code editors (there, I liked those dark even before because it makes syntax highlighting “pop” much better). It was only after those releases when I started wanting dark mode.

      We have to get away from printer paper light mode themes.

  • memoriyato3 2 hours ago
    I use an app to switch the Windows system theme between light/dark automatically based on time of day (similar to auto blue color reduction).

    It's funny noticing how most Electron/WebViews/web-sites immediately switch too, and have good dark mode support, while non-web-tech native apps either only support light-mode, have a bad looking incomplete dark-mode, or require a restart to switch.

    So much for "native GUIs are superior, consistent and respect the user". Microsoft is still struggling with adding dark mode support to most Windows included apps.

    • wongarsu 54 minutes ago
      Native GUIs used to be superior, consistent and respect the user. Adobe lead the way with making a GUI that's a branding experience, completely devolved from the OS theme, and in the last decade most have started following their lead.

      Add to that the lack of leadership and cohesion demonstrated by MS when it comes to GUIs. The original Win32 GUI was good, with lots of UX research and user testing behind it, and Borland made a great library and visual designer for it (a major selling point of Delphi). MS copied it for .NET as WinForms. That was the peak. Early to mid 2000s, depending on whether you prefer the Windows 2000 or Windows XP look. Themeable, fast, easy to design and intuitive to use, clear visual language with good user feedback.

      Then MS tried to make everything better with WPF. Then they tried again with WinUI, originally coupled to Windows Store apps (remember when MS still believed in that?). But whichever team was responsible for those within MS apparently didn't even have enough authority and resources to move more than a couple high-visibility OS components to it. Not to mention the mediocre features, dev experience and user experience

      • cosmic_cheese 44 minutes ago
        That move of Adobe’s drives me nuts even now. It might be my imagination but as I recall, the UI of Photoshop for example felt more responsive (at least on Mac) in 7/CS1/CS2 before they switched to the branded-UI mess (despite the hardware of that era being so much weaker than today’s), and visual contrast and readability was better before too.
    • skydhash 1 hour ago
      You can easily implement dark mode in a toolkit, you just add the new colors and switch based on the user preferences. The issue is that a lot of apps hard coded colors against the light background of the widgets. If you can find a solution for that, please share it.

      That’s why people like the old windows interface (windows 2k). It was fully themable.

  • styfle 1 hour ago
    I hate to be this guy, but I opened then immediately closed this website because it wasn’t in dark mode.
    • loloquwowndueo 1 hour ago
      Use reader mode. If you’re this militant, I’m certain your device defaults to dark mode and reader mode will honor that.

      Using reader mode is the same thing I have to do with the avalanche of sites now defaulting to unreadable-to-me dark mode.

      • bombcar 1 hour ago
        The humor is that it’s a page about respecting user mode setting that doesn’t respect user mode setting.
    • wanda 54 minutes ago
      Books and traffic signs must be a struggle.

      Good luck, I guess.