• Resolved onetrev

    (@onetrev)


    I am using v1.8.5 of Autoptimize and running into an issue where it looks like the order of my stylesheets is getting mixed up when the CSS code is optimized.

    You can see here http://pea.cldev.biz/economics-of-tourism/ how the min-width 768px code is coming after my base code, so the width of the white boxes is wrong.

    In my main style.css stylesheet where I have all my @import’s my 768-and-up.css sheet definitely is after my base.css styles and so it works fine without Autoptimize running.

    Am I doing something wrong here for how this plugin works? I know v1.5.1 fixed an issue with CSS being sometimes loaded in the wrong order so it seems like this shouldn’t happen.

    Thanks!!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Frank Goossens

    (@futtta)

    I think the problem migth be due to a known issue in the CSS import routine, which in some conditions does not ignore imports that are in reality commented out. Could you edit your style.css, removing this comment block;

    /* STANDARD & MOBILE ADAPTATION */
    /*
    @import "normalize.css";
    @import "base.css";
    @import "plugins-misc.css";
    @import "wp-styles.css";
    @import "break-styles.css";
    */

    and let me know if that fixes your problem?

    frank

    Thread Starter onetrev

    (@onetrev)

    That got it! Cool, big thanks there. I should have deleted those commented out @imports, but never would have thought they were the issue. Again thanks so much for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Order of @import stylesheets’ is closed to new replies.