CSS breaks when I enable D6 CSS Optimization...theories as to why?

Events happening in the community are now at Drupal community events on www.drupal.org.
bflora's picture

I've got a site I'm trying to speed up. One of the obvious tools for this is the "Optimize CSS" option over in the admin performance page. I've used this on other sites without problem. But for some reason, with this site, when I activate it, all my CSS disappears and I'm left without any styles at all on the page.

I've spent a little time trying to troubleshoot but am stumped. What could case the entire CSS to disappear when I activate that option?

Comments

The CSS aggregator is pretty

dalin's picture

The CSS aggregator is pretty good but can barf on bad syntax. My first recommendation would be to validate your CSS.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Thanks, that worked great!

bflora's picture

Thanks, that worked great!

I want to share one more

pflame's picture

I want to share one more cause of CSS optimization break. If the css file uses @import to import files from different locations, css optimizer breaks at adding the correct background url paths. For example I have a style.css in my theme which imports css files exists in the css directory inside the theme directory. In that case it will cause bad syntax and entire layout breaks.

We spent around 8 hours to figure out this.

Issue

Even more relevant issue:

Garrett Albright's picture

Even more relevant issue: http://drupal.org/node/444228

Recently had this one bite me again… The most recent patch in the queue works like a charm, and will hopefully be in a release soon.

Validating my CSS fixed my

jumoke's picture

Validating my CSS fixed my CSS breaking when optimized issue.