Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting css property using .darkmode--activated class is not working #63

Open
sebakthapa opened this issue Jan 17, 2021 · 4 comments

Comments

@sebakthapa
Copy link

Overwriting CSS property using .darkmode--activated class is not working and also overwriting class attributes too are not working.

@kenjibailly
Copy link

I tried to ignore some elements for dark mode using all the options I found:

  • Use the class darkmode-ignore where you don't want to apply darkmode
  • You can also add this style: isolation: isolate; in your CSS, this will also ignore the darkmode.
  • A CSS class darkmode--activated is added to the body tag when the darkmode is activated. You can take advantage of it to override the style and have a custom style

None of the above worked, I loaded Darkmode.js with CDN.

  • It is also possible to revert the Dark Mode with this style mix-blend-mode: difference;

This one above did some weird things and pulled out colors, at least it did something I guess? Not what I was expecting though.

Would be really lovely if this issue could get resolved so this can actually be used.

@sandoche
Copy link
Owner

I think the option that works the best is:

  • applying mix-blend-mode: difference; style on the items where the color is reversed. does it work?

@sandoche
Copy link
Owner

Have you tried this?
#60

@Purfview
Copy link

I found that there is no single solution, basically you need to read and understand what "mix-blend-mode" does and how it interacts with various elements.

There I made it work as userscript -> https://github.com/Purfview/Darkmode-User
You can find there hints what worked or use it for quick testing with few tweaks to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants