• Resolved michelgreenwood

    (@michelgreenwood)


    Grrr… Jetpack just updated, and now their Custom CSS creates a separate css file if you have more than 2000 characters. It seems that it’s escaping autoptimize. Any thoughts on how they could be so sneaky?

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

    (@futtta)

    got a link where I could see that Michael?

    Thread Starter michelgreenwood

    (@michelgreenwood)

    Plugin Author Frank Goossens

    (@futtta)

    ah, I see;
    <link rel="stylesheet" type="text/css" id="wp-custom-css" href="https://www.christianpedophile.com/?custom-css=b636c1f94b" />

    as this is a dynamic file (as in served by PHP, not static .css-file), AO skips that. what you could do is switch to using the custom CSS features that got introduced in WordPress 4.7 (in the Customizer) instead maybe?

    Thread Starter michelgreenwood

    (@michelgreenwood)

    Yes, I would do that, but Jetpack inserts a feature that allows you to bypass the theme’s original css, and only use the custom.

    Is there another way to do that? I know that’s a bit off topic.

    Thanks for clarifying.

    Plugin Author Frank Goossens

    (@futtta)

    Is there another way to do that?

    I’d go for child theme, but I guess the jetpack-way has a nicer UI. maybe some of the tips in this article can help; https://css-tricks.com/methods-overriding-styles-wordpress/ ?

    Thread Starter michelgreenwood

    (@michelgreenwood)

    That’s a good article thanks.

    It seems the custom css option in 4.7 adds the css to the head. Does that mean Autoptimize will strip that if you choose to aggregate inline css, and include it in the general output file?

    Plugin Author Frank Goossens

    (@futtta)

    Does that mean Autoptimize will strip that if you choose to aggregate inline css, and include it in the general output file?

    indeed

    hi there, i have just been thinking about exactly this too. My theme provider uses the redux framework for custom css (nice for splitting between screen sizes, etc) and their custom CSS ends up inline. This is exactly when I though of Jetpack and saw this new thread.

    Do you guys know of some way I can get the theme custom css into somewhere separate (so not inline) where AO can get at it for minification? I can’t enable inline minification in AO because the cache becomes massive.

    I know I could just have seperate CSS and includes, etc., but having somethnig with an actual UI is very convenient indeed.

    BTW using AO with critical css. It is great! ??

    Thanks!

    Plugin Author Frank Goossens

    (@futtta)

    Do you guys know of some way I can get the theme custom css into somewhere separate (so not inline) where AO can get at it for minification? I can’t enable inline minification in AO because the cache becomes massive.

    you could try to exclude the cache-busting inline CSS from optimization?

    Good idea – if I can work out the culprit CSS!

    Have you ever heard of Woocommerce Composites’s CSS being a problem?

    Plugin Author Frank Goossens

    (@futtta)

    ave you ever heard of Woocommerce Composites’s CSS being a problem?

    afraid I have even never heard of “Woocommerce Composites’s CSS”, so no idea if it’s trouble really.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Jetpack’s latest custom css escapes autoptimize’ is closed to new replies.