Menu Sign In Contact FAQ
Banner
Welcome to our forums

Dark/night mode theme?

It would be great if you would not go with a profile setting alone, but rather, for the devices and browsers that support it, read the system setting and use that. Look at the site that was linked above, there is CSS style sheets to use it seems.

My daily Mac news site does it well, use the system setting but offers an override well visible in the top too – 9to5mac.com

Any detail tips on how to do it will be useful.

Yes; it is done with CSS and that is the simple bit. What one doesn’t want to do is break something which then produces lots of complaints and which takes half a day to fix

What about browsers etc which don’t support it? It sounds like one has to do several different things.

I have found a dark mode in android settings / display, but it doesn’t turn the browser page dark. You just get dark menus etc. The main “sheet” remains white. Now if someone was running a site with a “night mode” CSS selected as well, that could produce some pretty interesting effects.

Administrator
Shoreham EGKA, United Kingdom

The site that was linked describes it pretty well.

CSS has a prefers-color-scheme media query which can be used to detect user’s system color scheme preferences. It can have three possible values: no preference, light and dark.

It’s all described under the heading Dark Mode at the Operating System Level

I assume that if the browser does not support it, it just disregards it, in this case the “prefers-color-scheme”. However, I am not a FE dev, so just copying what I read from that site. I am sure others have additional insight :)

It is clear that making it automatic (based on client system settings) will not work on many clients, so an additional means would need to be provided.

And there are two ways of doing that:

  • profile config based
  • a button on the page

The 1st is straightforward.

The 2nd appears easy but in practice adding a button somewhere on the site will break something, because of the way HTML is rendered by different devices. So you get somebody running Safari v14.7 under MacOS 12.91 saying the button is missing. Or, better still, something else on the page goes missing instead – like the Donate button And in the absence of a login the setting has to be session specific i.e. it has expire at some point.

It would be interesting to hear whether people want this for night (low ambient light) usage or just because they like the dark mode anyway. Adobe (and quite a few others e.g. the Vegas video editor) have gone for the latter, and personally I like it. Dark mode is equally usable in bright ambient light.

Administrator
Shoreham EGKA, United Kingdom

So for me personally, any chance I have to use dark mode I tend to use it (unless it’s been exceptionally badly implemented). So I would use it all the time. It does tend to be late night browsing though when I think it would be nice to have one here.

United Kingdom

I support the idea. For late night browsing etc.

huv
EKRK, Denmark

For late night browsing etc.

That would require system support (time based, etc) and/or using a mobile device (ambient light sensor). It would preclude the user profile config method, which would work on any device.

Administrator
Shoreham EGKA, United Kingdom

I use firefox and safari on the ipad, but firefox has a native dark mode, so I use this at night. Firefox on the work computer has an extension called dark reader, and apparently will soon support the Windows 10 dark theme as standard.

EGHO-LFQF-KCLW, United Kingdom

Well, we have loads of really clever IT people on here, and somebody must know the right way to do this. It may be that some device supports it automatically but obviously some/many won’t and then the user profile choice would need to be provided, but what if a client had both active at the same time? Would you get “double dark”? Probably it would just screw up the CSS.

EDIT: how many of you have a “dark mode” option already on you device?

Administrator
Shoreham EGKA, United Kingdom

If we were in some hangar just having small talk, that would be where I would step in and say that I’m not against anybody’s preference, but I never used dark modes, and hate it with a passion. Totally personal preference of course. You can hate me for it, it’s alright. I’ve left the CRT vt100 terminals, green or amber on black, in the distant past and do not intend to change it.

In a few years we can discuss again if dark modes were a fad or if it stuck :-)

https://www.howtogeek.com/423717/dark-mode-isn’t-better-for-you-but-we-love-it-anyway/

https://www.wired.co.uk/article/dark-mode-chrome-android-ios-science

“Research published in 2013 by psychologists Cosima Piepenbrock and Susanne Mayr showed that accuracy and performance are better in positive polarity conditions (i.e. black text on a white background). The study involved participants carrying out both visual acuity tests and proof reading tasks. On these tasks, participants both read faster and/or spotted more mistakes in the positive polarity condition.”

The only positively uncontested advantage is battery saving on mobile devices. I prefer to save my brain power.

Slightly OT: Did you know the original Macintosh, had the frame buffer ( actually a bitmap as it was only black and white ) reversed from the convention at the time, in that a ‘1’ bit meant the pixel was black? Even if that meant the CRT would be OFF for that bit/pixel. It was a statement of how much they believed in the ‘ink on white paper’ modelling of physical documents. And now Apple (driven by battery concerns, I’m sure) is the champion of dark mode. The irony.

You can go now back to your discussion on how to actually implement it :-)

EHLE, Netherlands
Sign in to add your message

Back to Top