OSM Wiki Skin “dark mode"

I use the dark mode on my notebook, also for this forum. Opening the OSM Wiki flashes to a bide white screen layout/skin. There is no skin or setting for dark mode?

https://wiki.openstreetmap.org/wiki/Special:Preferences#mw-prefsection-rendering

How to add one? Who does have expirience to do it?

5 Likes

AFAIK the dark theme option must be enabled server-side in order for the user to have to option to enable it.

I think you could get a proper answer by asking the same question in the Talk:Wiki page of that wiki.

1 Like

Done: Skin Request: Dark Mode
:hourglass_flowing_sand:

Reposting the response on the Wiki by @chris2map which I tested and confirmed working:

You could override the style settings by add dark mode CSS definitions to your user common.css. For this you may use the ready definitions from User:Volker E. (WMF)/dark-mode - Wikipedia. All that you have to do is add the following line at the top in your common.css: @importhttps://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-dark-mode.css&action=raw&ctype=text/css”;. --Chris2map 16:25, 27 March 2025 (UTC)

(Since the special links don’t work here, I removed them - but the common.css referred to here is a page you create as a subpage of your user page, for example https://wiki.openstreetmap.org/wiki/User:Lumikeiju/common.css)

Yes, the 2nd @input worked. Quite nerdy for my. Good to have a proved dark skin. But it should be one of the official options, shouldn’t it?! ~~~~

Yes, I agree. I just wanted to sunlight the workaround because changes like this come very slowly. I proposed an extension addition on 19 May 2024 (linky) which was unanimously supported by others but has has no real movement since.

1 Like

Thanks to @chris2map for bringing this request to the wiki administrators’ attention. While it is technically possible for the administrators to hack in custom dark mode support with enough effort, the software actually comes with built-in support for dark mode that the operations team can enable via some configuration variables. I think this built-in support would be easier to maintain and more resilient to future software changes. I’ve forwarded the request to them for further investigation:

3 Likes

Dark mode is now live on the wiki following an upgrade to MediaWiki. To enable it, change the Color (beta) setting in the right sidebar from Light to either Automatic or Dark. If you don’t see a right sidebar, make sure you’re logged out or your Appearance preference is set to Vector (2022). If you still don’t see a right sidebar, click the :eyeglasses: button in the toolbar at the top of the page, to the right of the search bar.

Now for the hard part: over the years, we’ve amassed plenty of sitewide and inline CSS code that assumes what’s now the Light color scheme. This assumption breaks as soon as you switch to the Dark color scheme. Most colored boxes and color-coded templates remain blindingly bright, and text is illegible due to low contrast.

The administrators need your help in identifying templates that are garish or unreadable and fixing them to be night-compatible. Please note individual issues on this requests page or leave a note on the template’s talk page, tagging it with {{edit request}}. I’ve asked for the TemplateStyles extension so that I won’t have to centrally administer every little bit of CSS that appears on the site in one massive file.

On that note, we have an ongoing vote on adding several new administrators to the site, mostly in order to take care of boring cleanup tasks that users with normal rights are unable to help with.

3 Likes

So glad to see this! Thank you :slight_smile:

Small PSA: Remember to update/delete any https://wiki.openstreetmap.org/wiki/User:Lumikeiju/common.css-style pages that had @import "https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-dark-mode.css&action=raw&ctype=text/css"; and disable any extensions like Dark Reader.

1 Like