Developer knowledge-sharing site Stack Overflow has rolled out a dark-mode theme, finally delivering the site's most sought-after feature.
Apparently it was quite a technical and design feat to bring dark mode, which is the 12th most upvoted question on the Stack Overflow Meta community – which still doesn't support dark theme – and the top most upvoted feature request.
It should be a welcome addition for those Stack Overflow users who were complaining that opening the site hurt their eyes after coding in the dark with an editor that supports dark mode.
To enable the dark theme, users need to log into the site and set dark mode in user preferences. In preferences, there are now light, system setting, and dark themes to pick from.
SEE: How to build a successful developer career (free PDF)
According to Stack Overflow's director of content, Ben Popper, there have been lots of challenges in bringing dark mode to the site, which is among the top 50 busiest sites, according to Alexa rankings. Also, besides the question and answer platform, it also has developer profiles, job listings, and product pages.
There are no plans to implement dark mode run on the wider Stack Exchange network, which includes its many other question-and-answer sites like Ask Ubuntu, Mathematics, and Server Fault, according to Popper.
"Many of the designs on our sites have been around long enough that converting them to dark mode would require redoing the artwork completely," noted Popper.
"We would prefer to avoid giving anyone across our network a substandard experience and we don't want to change those elements without the input of these communities."
One roadblock was that Stack Overflow supports Internet Explorer 11, which doesn't natively support CSS or cascading variables. Refactoring the site's color styles into CSS variables was suggested as a potential solution to supporting dark mode across the site.
"In our primary.css, the legacy stylesheet responsible for questions and answers, we have 9,920 declarations and 179 unique colors. We're not talking a few hours of work. This is a sustained effort of months," explained Shekey.
"For each hour we spend shipping a dark mode our users approve of, an hour is taken from shipping features that more directly affect our bottom line, enabling us to ship more features in a sustained, maintainable manner."
While the site seems pretty consistently dark, the jobs panel is still white. However, according to Shekey, that's not a Stacks issue.
During the beta, some sections of the site are out of scope for the new dark theme, including:
- Homepage of Stack Overflow for non-logged in users
- Talent client portal
Stack Overflow does intend to bring dark theme to the Meta Stack Overflow site.