Support » Plugin: Blackout: Dark Mode Widget » Some things turn white when enabled

  • Resolved crustystainedtowel

    (@crustystainedtowel)


    Hello

    I have an issue with it. My theme has the option to let me override the original CSS code to change colors and so on. The problem is, the parts I changed dark to override the original themes colors now turn white when I activate this plugin. Can you add the option where I can add another set of CSS color customizations in the settings of the plugin to correct this issue?

    I really would love to have this enabled but as it sits, anything I changed dark with !important; is now white.

Viewing 1 replies (of 1 total)
  • Plugin Author Jose Sotelo

    (@josesotelocohen)

    Hello @crustystainedtowel

    The plugin works by creating a layer of white background then using mix-blend-mode: difference to create the dark mode effect, we don’t actually change any colours.

    So what you can do in this case is using jQuery to change your dark colours to white ONLY when dark mode is active.

    To do this you could do something like:

    function darkmodeChangeDarkColours(){
        $('.darkmode-toggle').click(
            function() {
                if ($('body').hasClass('darkmode--activated')) {
                    
                 YOUR CODE TO CHANGE DARK TO WHITE
    
                }
                else{
                   REVERT CHANGES
                }
            }
        );
    }

    Something like that should do the trick!

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Some things turn white when enabled’ is closed to new replies.