question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Auto-detect, then apply if needed

See original GitHub issue

Some 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:open
  • Created 3 years ago
  • Reactions:13
  • Comments:27 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
emtiucommented, Jan 28, 2022

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.

3reactions
Artoria2e5commented, Apr 11, 2021

This approach wouldn’t work all the time If the website’s foreground content happens to span across a large portion, the value returned from backgroundColor will be useless

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto detect previously used display and apply last setting ...
I'm going to start perusing your code and see if there is a simple way for me to add this feature and submit...
Read more >
Feature Request: Auto-Detect Embedded Packages - Unity Forum
Not sure if this has been suggested yet, but it'd be great to be able to see which embedded packages exist in the...
Read more >
Feature Request: If template name changes, Forms should auto ...
Feature Request : If template name changes, Forms should auto-detect the change and rename it in Process Modeler. Forms Version 10. Updated February...
Read more >
How To Use MetaMask's Token Detection Feature For A More ...
MetaMask's newest token detection feature can auto-detect tokens featured on two or more token lists. Here's how to turn it on. by ConsenSysOctober...
Read more >
What feature settings can I enable in my user acco...
Learn more about User Feature Settings and how to enable them in the ... The tutorial applies to all of your courses in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found