User:Volker E. (WMF)/dark-mode

WikimediaUI Dark mode is a user script for enabling dark-mode in modern browsers. It is also available as a gadget on English Wikipedia. Note that this is an experiment based on the work of Wikimedia Design team members Volker E. and Alex Hollender in support by volunteer MusikAnimal and others. ''It's now among the top 5 most-used custom enabled gadgets on enwiki, without any advertisment. Thanks to all users!''



Any modern browser works with the only exception being Opera Mini, which lacks  support.

Read more about the reasons for light-on-dark color scheme aka dark mode like reduced eye strain or energy savings specifically on OLED displays.

Installation
Some of the installation options enable usage on en-wikipedia. However, note that the CSS was written with Wikipedia in mind (see T221425) so experience on other wikis may not be very optimal.

English Wikipedia
Go to your gadget preferences, and enable the gadget "".

You should see a "Dark mode" switch after clicking on the profile icon at the top right corner of your screen. If you wish to enable/disable dark mode automatically based on your system colour scheme, add the following to your common.js page: window.wpDarkModeAutoToggle = true;

Other wikis
If the gadget is not installed, you could try one of the below options:

Option 1: Permanently enable dark mode (no toggling)
Add the following line to the top of your Special:MyPage/common.css page on that wiki:

Option 2: Enable dark mode automatically based on the system theme
Add the following line to the top of your Special:MyPage/common.css:

Option 3: Enable dark mode with a toggle (causes flickers)
It adds an item to your personal menu labelled “Dark mode” (Vector) which turns it on and off. This option causes a flicker to happen on page loads. This should work on any wiki. Additionally it uses the Operating System user preference for light or dark color scheme by default.

Enable the user script User:Volker_E._(WMF)/dark-mode.js by adding the following line to :

Known issues

 * In the Firefox browser with monobook skin, MediaViewer is busted (no longer shows image previews). Now Fixed —Th e DJ (talk • contribs) 23:13, 4 December 2021 (UTC)
 * In the Firefox browser, a white bar can appear in the middle of the current page. Turning off the script / css seems to fix this.

×