I'm currently creating a custom Drupal theme for my company and I'm having trouble getting multiple stylesheets to load.
I followed the instructions on this page by adding stylesheets to the .info file in the format:
stylesheets[all][] = style.css
stylesheets[all][] = name2.css
etc...
However, when I load the page nothing changes and when I view source, it consistently lists style.css but seems to ignore the others. Am I misunderstood in the process of adding additional stylesheets? What could I be doing incorrectly?
Thanks for any help!
Make sure the ‘Optimize CSS files’ and ‘Caching mode’ settings on
/admin/settings/performance
are disabled. Try clearing the Drupal cache by hitting the ‘Clear cached data’ button on the bottom of that page.Apart from the mentioned cache clear, You might also need to visit the theme-selection page once:
This is to make sure the .info-file gets read again (it's not read on every pageview if Drupal already read it beforo you modified it).
If you see the .css file in the source as "style.css", the CSS optimization is 'off' (when it's on the files have been aggregated to one or several css file with hashed filenames like 'css_1d74ed895e4b5634b0aa1e99c1d0a174.css').
Also, you don't have to turn CSS-optimization off, clearing the cache rebuilts it. While you develop the css files all the time though, it's best to turn if off so you don't have to clear the cache all the time. Turn it on after you're done, it's a really significant page-load booster (in fact IE css loader can break if you dont use the optimizer and have too many css files).
Just to make sure, the css-files should be in the same folder as the .info file (and not for example the parent theme of a subtheme).
PS: clearing cache is fast and easy with the excellent admin_menu module ( http://drupal.org/project/admin_menu ).