325

Original issue from 2013: Why is there no dark theme on SO?

It's 2019. Operating Systems have started having a user preference setting for a light UI or a dark UI. Windows 10, iOS 13 and MacOS 10.14 all support this.

The browsers now pass the user's preference through to the webpage via CSS via the media query for prefers-color-scheme. Safari and Firefox both have this shipping in the stable versions of their browsers. Chrome's is in Beta and will be stable soon (v76).

UPDATE: Chrome is now shipping this with the stable versions and a majority of users in the world (currently over 75%, per: https://caniuse.com/#feat=prefers-color-scheme) have the ability to have the browser identify if the user prefers light or dark color scheme. This is an accessibility issue for many users as well as a power saving option for mobile devices.

Should Stack Overflow respect the user's OS level preferences and support a dark mode directly? In other words without the user having to jump through hurdles, install userstyle css files or extensions but instead just respect the OS settings the user has selected?

It seems like the world has changed since 2013 when there was no OS level -> browser level user preference. While CSS is required to implement this no S.O. UX or user profile schema change is required. OS vendors and browser vendors are encouraging apps and webpages to support dark mode. Shouldn't S.O. reconsider in light of changing situations?

27
  • 96
    I feel like the priorities of SO Inc. are pretty outlandish. They abandoned the mobile app and don't include a mode which would be achievable with a pretty simple CSS swap.
    – ㅤㅤㅤ
    Commented Jun 18, 2019 at 11:35
  • 19
    I wonder who came up with the idea of a light theme in the first place!
    – David
    Commented Jun 19, 2019 at 10:35
  • 41
    I wonder why nobody mentions this is an accessibility issue.
    – SoniEx2
    Commented Jun 19, 2019 at 19:57
  • 2
    @TamásSengel but there is a stackexchange app now. Which I like better Commented Jun 20, 2019 at 8:09
  • 2
    I think there are far more important things SO could spend time on. Fine tuning and evaluating the Ask a question wizard, for example. And if it proves to have the desired effect, consider porting that one SE-wide. As long as such things are the priority, then I couldn't care less if the default theme is light, dark or purple with unicorn gif animations.
    – Lundin
    Commented Jun 20, 2019 at 8:36
  • 5
    @David the need for a dark theme is further proof that we're all heathens who have completely broken the idea and purpose of the web.
    – Gimby
    Commented Jun 20, 2019 at 11:33
  • 4
    I don't know anybody who codes in an editor with a white background, for obvious reasons—I don't think I've ever even seen it. And as often as programmers reference SO as they code, one would think that a dark UI would have been an option from day 1. There's nothing like turning to a bright white screen to look something up on SO after hours of relaxed coding on a calming, dark UI.
    – slushy
    Commented Jun 20, 2019 at 16:37
  • 7
    @J... - White text on black is actually harder on your eyes. I wrote about it, in a very similar answer at MSE requesting this exact same feature. I do appreciate the humor though.
    – Travis J
    Commented Jun 20, 2019 at 17:59
  • 7
    @TravisJ My eyes disagree. Also, the science and reasoning expressed in that post to justify said claims are highly questionable. Black on white is perfectly sensible on paper or other reflective media. Not on a luminescent display.
    – J...
    Commented Jun 20, 2019 at 18:28
  • 2
    @TravisJ Previously I was merely talking about subjective comfort. You're implicitly implying that white text on black will promote degradation of visual acuity, however. Do you have any evidence to back up that implied statement? I don't think it exists, to be honest.
    – J...
    Commented Jun 20, 2019 at 19:06
  • 2
    @TravisJ I don't feel you even addressed the previous claims. They're not worth addressing. It's just a random opinion quoted from some random website that botches science so badly that it doesn't even merit consideration.
    – J...
    Commented Jun 20, 2019 at 20:46
  • 7
    @TravisJ A random opinion from an MD's blog is not peer-reviewed science. To the best of my knowledge there exists no legitimate science to suggest that light-on-dark or dark-on-light colour schemes contribute anything to deleterious eye damage over the other. It's a subjective preference about subjective comfort.
    – J...
    Commented Jun 24, 2019 at 11:49
  • 6
    @TravisJ You're the one who has made a striking claim - that simply changing the colours on a monitor can promote eye injury. I don't have to prove anything - you do. By 'random' I mean it is a lone voice outside the sphere of peer-reviewed science. I have not seen any real science to support what you suggest.
    – J...
    Commented Jun 24, 2019 at 18:10
  • 7
    @TravisJ That doesn't address the claim that black-on-white increases damage to the eye. I'll grant that in certain lighting scenarios there are arguments in favour of balancing the average display luminosity with that of the ambient room, but that's not really about dark on light or light on dark. You claimed dark-on-light would increase the risk of eye injury or damage. You have shown no evidence for this. I'm not being disrespectful, this is how science works. I would be interested to read any such study - I'm not aware that any exists.
    – J...
    Commented Jun 24, 2019 at 22:49
  • 3
    As someone with floaters, ocular migraines and general eye strain issues, I can say this is very much an accessibility issue. If you don't have these kinds of issues, it's hard for you to be able to know what those of us with these kinds of issues deal with. So dark mode is very much needed. I work around it with browser extensions or chrome flags, but that should not be necessary for this big of a site...
    – jjxtra
    Commented Jan 6, 2020 at 1:57

3 Answers 3

99

The current situation at Stack Exchange

To summarize staff member Aaron Shekey's comment on this issue in Stack Exchange's GitHub repository, the new Stacks design doesn't have code coverage(?) to swap themes based on user-preference or OS setting.

A dark theme will also introduce additional complexity to support when developing new features or fixing existing bugs. This is not feasible when there are over 200 themes supporting about the same number of Network sites, as you would also have to test each one individually on top of testing desktop/tablet/mobile breakpoints.

While a dark theme is a highly-requested feature and one I would also welcome, I personally do not see this happening anytime soon even when it has been added to the Roadmap as I understand the complexity involved.

The next best solution

In the meantime, I have created a userscript "Stack Exchange Dark Mode" that works for ALL Network sites (a bold claim, but try it out yourself!), and supports all moderator/hidden pages as well (like post timelines). I am using this and will actively fix bugs when I come across them, especially when design changes.

My userscript also automatically does two levels of dark, which you can't implement using userstyles. There's a black/midnight mode for very late nights (10 pm-6 am), and a dark-grayish mode all other times.

Features

  • Supports all network sites, not just Stack Overflow!
  • Works on Chat.SO, Chat.SE, Chat.MSE!
  • Dual dark themes - midnight black for late nights
  • Inverts SVG colours
  • Some elements have reduced opacity until focused/mouseover (sidebar modules/images/timestamps). Some important colours are retained.
  • Code highlighting in darker colours
  • Darker post revision colours
  • Dark code snippet editor
  • Ensures no blinding white elements even if SO adds new features in future
  • Works on all ~66 SOMU userscripts (found here)
  • Support for SO, SU, SF, and other network site logos (instead of just plain white)
    image
  • Open source

Install

25
  • 20
    I'm using Sam's dark theme and can report that barring some minor hiccups like inconsistencies with background blended images on certain site themes (who honestly cares, anyways), the dark mode userscript works wonders and hasn't broken anything substantial for me yet, having tested it on more then 30 network sites so far.
    – Magisch
    Commented Jun 18, 2019 at 6:14
  • 3
    It works all too well. This is pure witchcraft.
    – yivi
    Commented Jun 18, 2019 at 6:20
  • 70
    Writes a bold claim in bold. when meta is so meta.. xkcd.com/917
    – Kaddath
    Commented Jun 18, 2019 at 8:05
  • 7
    This is what I love about this community. Everybody is so talented in different ways and uses that talent to help us all. Good question aksed, perfect answer given 1 hour later. And great tool Sam! Commented Jun 18, 2019 at 8:11
  • 131
    This doesn't make sense. Your post basically says "it's not feasible, but here, I made it". If you've created a script that supports "all network sites", then why can't SE just use that script, or do something themselves?
    – LinusG.
    Commented Jun 18, 2019 at 11:49
  • 30
    Also, I feel like supporting StackOverflow would already be a huge plus, because it's the largest site and developers work late night 😉 Plus, the question reads "should StackOverflow revisit dark mode", not StackExchange.
    – LinusG.
    Commented Jun 18, 2019 at 11:49
  • 6
    Dark Reader works fine with StackExchange. Bonus: You get dark mode for the rest of the web as well :)
    – Roger Dahl
    Commented Jun 18, 2019 at 15:07
  • 20
    So "dark mode" is a no go because of complexity, yet each exchange site can have its own theme? If individual users can do it, like here, here, here and here to name a few, then surely a team of developers can figure something out.
    – Someone
    Commented Jun 18, 2019 at 16:17
  • 23
    It's amazing what a single developer with a good attitude can do. But when a bunch of people gets into a scoping meeting the difficulty gets multiplied. Great job @samuel-liew Commented Jun 18, 2019 at 22:41
  • 51
    Maintaining two themes is not feasible? Ok, just abandon the light one then...
    – Siguza
    Commented Jun 20, 2019 at 8:09
  • 22
    thanks Samuel, you've darkened my day. Commented Jun 20, 2019 at 12:08
  • 5
    Literally, all you gotta do is change colors of things...
    – Rojo
    Commented Jun 20, 2019 at 21:50
  • 11
    if Aaron Shekey spent a fracton on the time he's spent telling us how difficult it is to implement and listing all the reasons why its impossible to do... he could have given us dark, high-contrast and glitter-pink unicorn themes. A 'can-do' attitude seems to be sorely lacking at SO these days.
    – gbjbaanb
    Commented Sep 17, 2019 at 18:50
  • 5
    So, let me get this straight. There's a JS that can be applied to the site to offer a dark-theme RIGHT HERE in this answer, but actually implementing this as an option that could be built-into the actual site is too complex? Oh, wait, @LinusGeffarth already wrote exactly this...
    – MBender
    Commented Dec 21, 2019 at 23:22
  • 5
    It's blinding. I get up at 2:00 AM. Three screens in dark mode. Mellow. I come to stackoverflow and it's the elephant in the room. Glaring bright white on the browser. Ruins the whole setup. Please don't become like Craigslist.org stuck with a clunky old interface because it's too much trouble to change or people are stubborn. Dark Mode isn't a passing fad, it's here to stay. People are going to increasingly seek options to hae it available.
    – clearlight
    Commented Jan 6, 2020 at 10:12
19

Stack Overflow now has a dark mode, currently in beta. Thanks SO team!

https://stackoverflow.blog/2020/03/30/introducing-dark-mode-for-stack-overflow/

enter image description here

1
  • 1
    Love it! When will it be implemented on the rest of the Stack Exchange sites (including Meta SO)?
    – RobH
    Commented Mar 30, 2020 at 21:55
2

The Dark Reader browser extension/add-on works really well. It's automatic and doesn't require the web site designers to change their code on the web server.

Google Chrome:

Firefox:

Safari:

0

You must log in to answer this question.