Using Optimized CSS and JS by Drupal for other files outside Drupal
I think my question would be better laid if I write here the scenario of our current set up and the things I want to achieve. We have a Drupal 6 site and freemarker files that are using the same theme as Drupal. Now I have to optimize the loading and reduce the file dependencies of the freemarker files to CSS and JS. I was told to use the minified/o开发者_如何学运维ptimized JS and CSS of Drupal and delivered it via CDN. But using those minified and CSS alters the design of the freemarker pages. I'm still not sure the solution for this. Thanks for your help in advanced.
Validate all of your CSS and look for parsing errors or warnings and correct them. This should prevent layout issues when minifying/optimizing it. I've had this same issues with CSS in the themes of Drupal we created. After fixing parsing errors, I could aggregate just fine.
I may be stating the obvious here, but if you're using the same CSS on two sites and the visual results aren't the same, the markup must be different. So either your markup needs to be changed on one of the sites, or the CSS needs to be made more general to work with both types of markup.
精彩评论