Drupal 6: Get your CSS-only theme, right here!

A little over a week ago, I wrote about fixing Drupal's core CSS rules for menu and list handling. For designers, overriding the appearance of Drupal's normal navigation menus has always been frustrating -- the default CSS rules had a high level of specificity, so overriding was difficult. And removing the CSS file itself required writing PHP code, copying and pasting large chunks of CSS that were still needed, and so on.

I'm here today to tell you some good news -- those problems are now fixed, and the work of creating a 'pure CSS' theme in Drupal 6 is now much, much easier. A theme's .info file can now specify replacements for entire core CSS files (eliminating entire sets of CSS rules without manually overriding each one) and the menu-related rules have been split into their own file for easy overriding. Combined with the other themeing improvements in Drupal 6, making themes with nothing but CSS files and a folder full of images is now pretty straightforward!

As an experiment, I hopped over to a free CSS template archive and grabbed one of their designs: Snowcrystals, a simple but representative layout that uses positioning rules and images to provide a clean bloggy layout. Lo and behold, it works, with no PHP or template overrides. It's not finished at all -- I haven't put any work into the CSS rules for the comment pages, tables, or anything beyond basic front page and node formatting. But as a proof-of-concept, it's very, very encouraging.

Designers? We're listening!








css-only-theme.jpg

Get in touch with us

Tell us about your project or drop us a line. We'd love to hear from you!