Hello,

Recently I came across an issue. I was working on a site on development server where I used to put all my css files in tpl files of the theme. When moving to production site, I removed all of the css files from page.tpl file and put them in .info file of my theme so that they can be compressed by drupal for better performance. But after doing this many styles of the site was broken. What I can think happened was that drupal did not care of the order the css files were included in. The order is very important as many styles in one css file are some times overridden in some other file. Is there a way to tell drupal to follow the order of css files when they are put in .info file? Or this is some other issue?

The important thing is that when I put the css files in .info file, they are included for sure, and I can see them in the browser, but they do not work. But as soon as I move them back to the page.tpl file, they start working and the styles on the site are correct.

Comments

damien tournoud’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

I'm not sure what "they are included for sure, and I can see them in the browser, but they do not work" would mean. Have you tried to disable CSS aggregation to see if the styles are correct? Of course Drupal does care about the order of the CSS it is dealing with.

yasir farooqui’s picture

Yes I even disabled the aggregation, and I meant that after doing this I can see that all css files are properly added using firebug. But even then the styles are broken, and the only way I can correct it is that I include css files in page.tpl. So I thought that may be it is an order issue. I have to put the css files back to the .info file to get better performance, but currently I am not able to do that.

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing this issue because of a lack of activity.