
Adding stylesheets to a web page is one of the first things a designer or developer learns how to do, but adding a stylesheet the "Drupal way" calls for a different approach. In my rush to finish the custom theme for my first Drupal site, I skipped the documentation on adding CSS and simply placed a link to the stylesheet in the page.tpl.php template file.
It's a little embarrassing to admit this mistake now, but it wasn't such a bad guess, really. After all, adding styles to a template file is the preferred method in other flavors of web development. But by adding my CSS in this way, I bypassed Drupal's stylesheet aggregation and compression, and in doing so, lost a nice little performance boost.
Now that you know how you shouldn't add your styles, here are three ways to correctly add them to your Drupal theme.
Read full post