Drupal Sub-themes using SASS
by Alexandra Atzl
Being relatively new to Drupal, I was overwhelmed recently by the task of implementing a base theme and three sub-themes for a customized system of Drupal sites we were developing at Singlebrook. I needed a clear, simple way to write the necessary CSS code, without having to repeat it up to four times.
The basic principle governing this entire project was to be as lightweight as possible. We wanted an end product with no repetitive or unnecessary code, and that would be relatively future-proof. Across the board, we strove to avoid unnecessary modules and to create our own custom ones to perform just the functionality we needed; no more and no less. We avoided Views, made generous use of Drupal hooks and theme functions, and ended up with a site that does what we want, without overly-large modules and excess code slowing it down.
On the theming side, we knew we needed to deliver three different themes to the client (#1, #2, & #3), plus an additional base theme, which would mostly mirror theme #2. We also knew we wanted to use SASS (now that I've begun using it, I'm completely reluctant to return to plain ol' CSS, and I think all of Singlebrook agrees). ...