Support » Plugin: Autoptimize » Autoptimize not picking up the over-written CSS Files?

  • Resolved amitramani

    (@amitramani)


    Hello
    On my site, I have added a media query as follows in the style.css (of my Genesis child theme).

    @media only screen and (max-device-width: 480px) and (min-device-width: 320px)
    .woocommerce ul.products li.product, .woocommerce-page ul.products li.product, .woocommerce-page[class*=columns-] ul.products li.product, .woocommerce[class*=columns-] ul.products li.product {
        width: 100%;
        float: none;
        clear: both;
        margin: 0 0 .992em;
    }

    Somehow, the default CSS (from WooCommerce) is overwriting this. When I disable Autoptimize (using ao_nooptimize=1), it works fine.
    The site is :
    https://www.tacknrider.com

    Any ideas?

    https://wordpress.org/plugins/autoptimize/

Viewing 4 replies - 1 through 4 (of 4 total)
  • amitramani

    (@amitramani)

    Anyone have any ideas? It is probably not related to AutoOptimize

    I am suspecting that maybe the order of the CSS media queries is incorrect?

    So for example, the media query for max-width:768px is over-writing the one for min-width:320 and max-width: 480px ?

    Plugin Author Frank Goossens

    (@futtta)

    maybe try adding some !important flags to the styles?

    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 0 0 .992em !important;
    amitramani

    (@amitramani)

    Thanks, @frank. I will try it. I thought the use of !important was widely discouraged ?

    Plugin Author Frank Goossens

    (@futtta)

    I thought the use of !important was widely discouraged?

    Don’t know, but I’m no CSS-expert. But getting things working takes precedence, no? 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Autoptimize not picking up the over-written CSS Files?’ is closed to new replies.