Extension:DarkMode

The DarkMode extension adds a link to toggle a dark mode theme.

Configuration
The following configuration variables can be set from your LocalSettings.php file:


 * $wgDarkModeTogglePosition - specifies where the dark mode toggle link should be placed. Possible values are:
 * (default) – next to the user talk page link in personal URLs.
 * – in the footer, usually after the "Disclaimer" link.
 * – in the sidebar within the navigation portlet.

CSS customization
Dark Mode works by adding the CSS  to the HTML element, and then applies some refinements to MediaWiki UI elements.

Excluding elements from dark mode
On your wiki, you can add the  CSS class to any element that you don't want inverted. Or you could use the same  CSS above again, which will invert and rotate the elements back to normal.

Styling elements in dark mode
Dark Mode adds the  CSS class to the HTML element. If you want to change the way some elements look in dark mode, just prefix the selector with.