[Feature Request] Auto-detect, then apply if needed
See original GitHub issueSome websites support dark mode.
Out of those, some only have a manual toggle, and some others have an auto-switching mechanism, based on the matchMedia()
API.
The thing is, I want the extension to work only on those that don’t have any support at all, and only based on matchMedia()
, in addition to a manual toggle.
For example, my website supports a dark mode, using Vuetify’s dark mode support, and it’s being switched automatically, based on matchMedia()
.
But, this extension overrides all the CSS values, so now it looks worse than it should look.
Also, some extensions in browser webstores implement their own dark mode versions, such as GitHub Dark Mode, and I honestly prefer the CSS values it gives to the page, rather than Dark Reader’s values.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:27 (13 by maintainers)
Top GitHub Comments
I believe that this feature will determine the future usefulness of Dark Reader.
As more and more websites have CSS-native dark modes (using OS/Browser theme detection and/or manual switches), it’s becoming an increasing pain to switch Dark Reader on and off to match for every single website, sometimes multiple times to determine whether a website has a native dark mode at all, and whether it’s better than what Dark Reader offers.
This is especially true on screen-estate-cramped mobile devices. Using Firefox on Android with both Dark Reader and the Android-native dark mode is a major pain in the app.
I strongly don’t think it works like that. Any sane person trying to put a dark background to the entire page starts by setting a background color for the body.
getComputedStyle(document.body).backgroundColor;
is a great heuristic, and anything else can go into the exception list.