• I haven’t managed to find any information about the CSS @import handling methods of minification available in the options. I’m trying to understand which does what… If you don’t know the answer to this question already, don’t waste too much time looking for answers to my questions – I’m going to find out by experimenting anyway, eventually, and then I’ll return with answers to my own questions…

    I’m customizing a theme by creating a child theme which imports the style.css of the parent theme, which of course is in a different folder, and I’m wondering what the differences between Process and Bubble @import handling would be in this case / in general.

    Specifically, regarding minification, would there be a problem (with any of the two @import handling methods) if the parent theme’s style.css used @import as well? I’m worried that deeply imported CSS may not be minified in one case, or may not even be included at all (inner-more @imports ignored altogether).

    Other things that concern me are whether any of the @import handling methods prevents the respective CSS files from getting combined and whether relative paths used in those CSS files still work in all cases.

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m interested in this as well. Would you mind sharing what you’ve found out?

    Currently I have the problem that W3TC minifies all CSS of plugins etc. However it does not minify the theme and child theme CSS files.
    At the end 3 CSS files are loaded – and 2 of them ain’t even minifed! – which could be combined into just 1 I guess.

    Any ideas?

    Are you guys using automatic mode for minification? I haven’t gotten very good results from that. Also, it blocks your ability to host minified files on a CDN.

    Use the manual mode. It isn’t bad at all. You can use the help wizard at the top of the Minify page to preload all the files. So it is like automatic mode, but with more control and better perks.

    Then go to something like Chrome’s developer tools network tab to see if there are stray files the plugin missed. If there are, you can add them manually.

    Yes, I’m using the automatic mode. I just changed to “manual” but unfortunately the help wizard doesn’t display any files to import. Maybe it’s because of the child theme or whatever…

    The problem is that when I switch to manual mode I have to manage the javascript files as well, however W3TC does a great job here!
    It really seems like a lot of work (7 CSS and 14 javascript files) just because W3TC doesn’t merge those other 2 CSS files into the large one.

    If I could only point W3TC into right direction without having to manage all by hand…

    If you believe it is an issue due to your using a child theme, try copying all the css files from the parent theme into the child theme. They won’t affect how the page works as they will override the parent’s files with the same values.

    I’m sorry I don’t have much experience with the help wizard not working, mine has always worked. I am using a child theme too, but I customized much of it, so most of it is in the child theme folder anyways.

    I hope that helps.

    Copying the style.css from the main theme to the child theme wouldn’t work because there already are two style.css files. (The child theme obviously overwrites styles of the main theme.)
    Those two css files are the only ones which are not minimized by W3TC. Also gzipping them doesn’t work either!
    I believe this might even be a bug because all other CSS files from the main theme are automatically minified/zipped without problems.

    Right now there’s nothing I can do about it which is really bad because about 60KB are wasted due to this problem.

    Thanks for trying to help though!

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    Unfortunately, bubble is unreliable. It uses a single regex to extract and retrieve imports. Process is much more stable and is to be used. It supports multiple levels. Make sure you have the correct @import statement it should come before any rules.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: W3 Total Cache] Process/Bubble CSS @import handling in child themes?’ is closed to new replies.