[Support request] some rules not loading from the style.css file

Home Forums Support some rules not loading from the style.css file

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1402405
    Alec

    Hi,

    I could not figure out, but some rules are not loading from the style.css in the Child Theme directory. But it is working fine when I copy the code to the customizer’s CSS / simple CSS.

    Tried to deactivate the caching plugins, still no effect.

    example (currently in the Simple CSS)
    /*Disable box-shadow links on Novashare social buttons*/
    .single .novashare-button a:not(.button):hover {
    box-shadow: none;
    }
    .single .novashare-button a:not(.button) {
    box-shadow: none;
    }

    https://aleckatzmusic.com/triads-in-jazz

    or:
    (currently in the Child’s style.css)

    /*Woocommers Single product descripton font size*/
    .woocommerce-product-details__short-description {
    font-size: 17px;
    color: #333;
    }

    https://aleckatzmusic.com/product/someday-my-prince-will-come/

    ====

    Thank you,
    Alec

    GPP, GB, WPSP only, no Site Builders

    #1402442
    David
    Staff
    Customer Support

    Hi there,

    i can see that child theme style on the front end – possibly browser caching – check in a Private/Incognito browser to check.

    #1402471
    Alec

    Hi David, thanks for a quick response!

    Yes, I know about the browser cache. I re-checked it in the private window of another browser. Still not working:

    /*Woocommers Single product description font size*/
    .woocommerce-product-details__short-description {
    font-size: 17px;
    color: #333;
    }

    https://aleckatzmusic.com/product/someday-my-prince-will-come/
    or
    https://aleckatzmusic.com/product/over-the-rainbow/

    or this:

    /*SIZE AND COLOR OF MOBILE MENU ICON*/
    button.menu-toggle {
    font-size: 24px;
    color: #ff6200 !important;
    padding-right: 35px !important;
    }

    Works only in the customizer’s Additional CSS

    I’ve been experiencing this sometimes, so my solution is to keep the “problematic” certain CSS in the customizer to make it work for me or to add there !important. But I guess it is better to keep all in one file in the Child’s style.css for the performance.

    The file seems to be ok (double-checked it)

    #1402511
    David
    Staff
    Customer Support

    Try adding this function to your site:

    add_action( 'wp_enqueue_scripts', function() {
        wp_dequeue_style( 'generate-child' );
        wp_enqueue_style( 'generate-child' );
    }, 99 );

    This should load your child theme styles after Woocommerce.
    We can then have a look at the non Woo CSS that you’re having issues with.

    #1402536
    Alec

    Sorry, that did not have an effect…

    #1402537
    David
    Staff
    Customer Support

    Is the code still added to the site? Can you change the 99 to 150

    #1402610
    Alec

    Sorry, I had to go out for a couple of hours. Will doit as soon as I’ll get back.

    Thanks for your help

    #1402814
    David
    Staff
    Customer Support

    No problem – let us know when you’re ready

    #1402998
    Alec

    Changed the value to 150 and it worked

    Sorry, now I think I got it.

    When checked again my css I’ve noticed I had to add .single-product here to apply white background and dark text for all Woocommerce & single products (just added here in bold text):

    /*White Backgrounds for Posts, Woocommerce, cart, checkout*/
    .single-post, .category, .tag, .woocommerce, .single-product, .page-id-1234 {
    background-color: #fff;
    }
    .single-post .container, .category .container, .tag .container, .woocommerce .container, .single-product .container, .page-id-1234 .container {
    background-color: #fff;
    color: #333333;
    }

    Sorry, I was my fault…

    Now everything seems to be fine and your code did the job.

    Thank you very much

    #1403722
    David
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.