• ANONIMNIQ

    (@anonimniq)


    Hi, this theme is just awesome! But I have some issues with the dark mode, sometimes it’s not remember user settings and some pages are in dark mode, other in light.
    Alseo, I want to make some changes to dark style css, I have child theme but don’t know how to override parent dark style.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Alexander Agnarson

    (@alxmedia)

    Hi! Glad to hear.

    The Light/Dark Switch has potential issues with cache plugins, which I do not know how to solve at the moment. So if you want it to work well, you need to turn that off.

    Option 1) If you want to use dark style as default with no switch, you need to copy over the entire function stylizer_styles() { } function, line 198-203 in functions.php to your child theme. Then adjust:

    
    get_template_directory_uri
    

    to:

    
    get_stylesheet_directory_uri
    

    For the dark.css line. This is if you use the dark style by default.

    Option 2) If you want to change dark.css for the switch instead, you need to copy over functions.php line 213-233 to your child theme’s functions.php. Change this line:

    
    wp_enqueue_style( 'stylizer-scheme', get_template_directory_uri() . '/' . esc_attr( $current_mode ) . '.css' );
    

    to this:

    
    wp_enqueue_style( 'stylizer-scheme', get_stylesheet_directory_uri() . '/' . esc_attr( $current_mode ) . '.css' );
    

    Then it will load from the child theme instead.

    Thread Starter ANONIMNIQ

    (@anonimniq)

    Thank you for your help. I copy these lines on my child functions.php file and changed this line, but now when switch to dark mode from the switch, every css changes that I made in the child style.css remain unchanged in dark mode. I even make some changes in my child dark.css but nothing changed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dark style issues’ is closed to new replies.