WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
[resolved] breaks X theme css (3 posts)

  1. James Revillini
    Member
    Posted 4 months ago #

    The x theme inlines their CSS. I see that with CSS optimized by your plugin, that it is grabbing it and adding it to the cached file, and it seems to be putting it in the correct place, but for some reason it causes the page to be incorrectly rendered. I'm trying to figure out if one of the other plugins has CSS that has bugs. If they did, it could potentially cause the rest of the CSS in the cached file to be ignored or improperly applied, correct? Should I use a tool like CSSLint to check each file individually to find if there are syntax errors?

    If you have any suggestions, please let me know.

    Here are the current set of URLs of CSS files on the site:
    //fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=3.8.1
    http://cdn1.vandertech.com/wp-includes/css/dashicons.min.css?ver=3.8.1
    http://cdn2.vandertech.com/wp-includes/css/admin-bar.min.css?ver=3.8.1
    http://cdn3.vandertech.com/wp-content/plugins/revslider/rs-plugin/css/settings.css?ver=4.1.4
    http://cdn3.vandertech.com/wp-content/plugins/revslider/rs-plugin/css/dynamic-captions.css?ver=4.1.4
    http://cdn1.vandertech.com/wp-content/plugins/revslider/rs-plugin/css/static-captions.css?ver=4.1.4
    http://cdn3.vandertech.com/wp-content/plugins/visual-form-builder/css/visual-form-builder.min.css?ver=20131203
    http://cdn2.vandertech.com/wp-content/plugins/visual-form-builder/css/smoothness/jquery-ui-1.10.3.min.css?ver=20131203
    http://cdn3.vandertech.com/wp-content/plugins/wordpress-seo/css/adminbar.css?ver=1.4.25
    http://cdn2.vandertech.com/wp-content/plugins/x-shortcodes/css/icon.css?ver=1.0.0
    http://cdn2.vandertech.com/wp-content/plugins/credit-tracker/css/ct-public.css?ver=0.9.10
    http://cdn2.vandertech.com/wp-content/themes/x/framework/css/site/stacks/icon.css
    http://fonts.googleapis.com/css?family=Lato:400,400italic,700,700italic|Lato:400|Lato:400|Lato:400&subset=latin,latin-ext
    http://cdn3.vandertech.com/wp-content/plugins/oik/oik.css?ver=3.8.1

    Here is the cached file from Autoptimize:
    http://cdn2.vandertech.com/wp-content/cache/autoptimize/autoptimize_7ca4985762a540577bdec90231ded7a5.css

    Thanks for any help!

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

  2. James Revillini
    Member
    Posted 4 months ago #

    Well, that was an easy find. I knew had to do with the Revolution Slider Plugin. I've had some many issues with the way they'd coded the style and script enqueing ... ANYWAY.

    The thing to know is that YES, in general, if there are syntax errors in any CSS files, it could cause some issues when all of the css is compiled by Autoptimzer, so the thing to do is to turn CSS optimization off, view source on your page, click each css file link, go to it, and use ccclint.net to check the CSS and fix any errors before enabling CSS optimization.

    For my specific problem: with RevSlider 4.1.4, which is the current one packaged with the X Theme by theme.co, Autoptimizer's CSS will fail because of a syntax error in RevSlider's settings.css file.

    To fix, go to wp-content/plugins/revslider/rs-plugin/css/settings.css, line 216, and change:
    .rev_slider .caption, { position:absolute; visibility: hidden; }

    to:
    '.rev_slider .caption { position:absolute; visibility: hidden; }'

  3. futtta
    Member
    Plugin Author

    Posted 4 months ago #

    that would not have been an easy question to answer, thanks for solving & sharing James! :-)

Reply

You must log in to post.

About this Plugin

About this Topic