[Question] Don't enable DarkMode on Certain Divs
See original GitHub issueHello, first of all thanks for making it open source, it’s really handy and easy to use and also it really makes UI look great.
I use the library in my website, I was wondering if there’s a feature to not apply darkMode in certain elements. Like if there’s a css tag --darkmode-donot-apply
or something like that just don’t convert colors for that element.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to set dark mode for random HTML?
Yes it is possible set the dark mode for any random content as well. ... concept and by gives you a widget to...
Read more >Disable or IGNORE only single div/element · Issue #4144
I'd like to be able to disable dark reader on a certain div. I use the monaco-editor which is embedded in an iframe...
Read more >Create A Dark/Light Mode Switch with CSS Variables
Step by step guide on how to create a dark-light mode switch with CSS ... <div class="slider round"></div> </label> <em>Enable Dark Mode!
Read more >Light & Dark mode WITHOUT CSS! - YouTube
The color-scheme property is a super useful property. It allows us to switch the UI elements, like form controls, scrollbars, and all that ......
Read more >How to Enable Dark Mode in HTML Email
The dark text on dark background issue will happen with email clients that do support dark mode but don't support prefers-color-scheme . That...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Gusted Thank you for the help! I forgot to add the
*
symbol after the selector. with.flag-icon *
all works correctlyHey @OverVlad!
We have 2 options to ignore styling. I see you mention SVG so I assume it has inline styles
You can add an selector to the
IgnoreInlineStyle
option via the api. The selector should match the elements directly that has the inline style e.g. if you haveAn selector like
should be added.
Whereby the
enable
API should look likeThe only intresting part is
url
has to be*
andignoreInlineStyle
that contains all the CSS Selectors that should be ignored for inline styling.If you have any other questions, don’t hesitate to ask them.
Regards, Gusted