Dark mode has become a popular feature for all electronic mediums, from desktops to mobile apps to web. Modern browsers broadly support the preferred-color-scheme @media
selector allowing a site to automatically match the user's device preference, and many websites allow a user to forcibly set dark mode, such as the StackExchange family of sites.
However, it can't be done by the themes alone. The backdrop_get_logo()
function returns a single graphic without consideration for the light or dark mode. The Backdrop logo, for example, works well with light mode pages, less so with dark mode.
To fully support Dark Mode in Backdrop, the following items would need to be included:
- [ ] Support for light/dark logos and automatic inclusion of the right logo in theme functions.
- [ ] Support in one or more stock themes, in particular Basis and Seven.
- [ ] A system-level, user-overridable setting (similar to timezones) for dark mode allowing for "light", "dark", or "auto" (follow device preference) that modules and themes can use to include the appropriate CSS.
- [ ] CSS cache support that won't send cached dark mode CSS to a light mode user.
- [ ] Color module support
- [ ] Backwards compatibility for themes and modules that have no notion of "dark mode."
- [ ] Update black PNG icons (to SVGs? https://github.com/backdrop/backdrop-issues/issues/364)
See also #3990 and #3991.
Recent comments
Tried and successfully applied DrAlbany's method with the form https://www.drupal.org/sandbox/grobot/2105379stickman hook. I also encountered the same situation. Thanks DrAlbany
Ubercart - Auto increment SKU
Since before migration you need to prepare the Drupal site - disabling and removing all modules, disabling themes, as part of the preparation you can clear the cache and logs, delete the search...
Trimming the size of my database for D2B_migrate not to error out (Request Entity Too Large / 504 Gateway Time-out)
QuickTabs is now available!!! But does not work as expected, already reported (https://github.com/backdrop-contrib/quicktabs/issues/14). Maybe an alternative solution using Views...
Quick Tabs (or method to simulate)