DarkMode: how isolate?

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
User avatar
MorningLight
 
 
Posts: 130
Joined: Tue Jul 04, 2017 12:15 pm

DarkMode: how isolate?

Post by MorningLight »

Hi !

I'm trying the DARKMODE extension and I saw on the original Github project (https://github.com/sandoche/Darkmode.js) that we can isolate the foreground color for any page component using:
.darkmode--activated p, .darkmode--activated li {
color: #000;
}

.button {
isolation: isolate;
}

.darkmode--activated .logo {
mix-blend-mode: difference;
}
But since it seems be built at the runtime, how could I set an image (like "Image1") or button (like "MyBtn1") to do not change its foreground color?

I appreciate any help.
wwonderfull
 
 
Posts: 1439
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: DarkMode: how isolate?

Post by wwonderfull »

The extension which has been provided is AS IS according to the licence. Anything extra you need to modify or add is totally on your skills. With a bit of simple learning you can do dark mod without even the need of the darkmod js its more like learning the real way of doing it. https://www.w3schools.com/howto/howto_j ... k_mode.asp

It shows how classes can be used to easily switch between light mod and darkmod. I prefer this way of doing darkmod than using the extension itself.
Post Reply