Darkmode.js
Darkmode.js copied to clipboard
Overwriting css property using .darkmode--activated class is not working
Overwriting CSS property using .darkmode--activated class is not working and also overwriting class attributes too are not working.
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.
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?
Have you tried this? https://github.com/sandoche/Darkmode.js/issues/60
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.