Search code examples
phpsassdrupal

I have a Drupal site: Can I use Sass preprocessor?


I´ve read that using preprocessors to code css3 is the best thing ever, because they make your life a lot easier. In fact, I´ve read a lot about some very cool examples, which made me excited about using SASS (I´ve read it's better than less).

Now, when I dig a little more to know how to install it and actually use it, I find that it works with Ruby... I assume that it means that I can't just install it and play with it as planned.

I've a Drupal site, and I thought that I could just install it in my server as I did with other scripts, and start coding with sass and the server would just read it and compile it in plain old css. Which... it seems that it doesn't work that way.

There are three Drupal modules that I've found that adapt Sass to Drupal: Sass API, Compass Stylesheet Tool, Sassy and SASS/ SCSS.

The three of them don´t have many installations, so there´s no "popular winner" here, and the three of them seems fit to the task, but as this is the very first time that I plan to use a preprocessor at all, well... I´m totally lost about what to do, and what´s a better choice (and why).

My site is a drupal 6, and I´m planning to upgrade it to Drupal 7. As I will need to create a new theme (it was a custom one) I planned to use Omega as a base theme and use it with Sass...?


Solution

  • I would recommend downloading and installing the official SCSS and Compass bundles.

    This does require you to install ruby, but only on your development machine.

    You should compile all your SCSS files before deploying them to your server anyway.