You are here

Installing Compass on Drupal server

Installing the theme is the easy bit. What is much harder is setting up automatic SCSS recompilation.

  • The README.txt file suggests using a full-blown installation of node.js just to manage this.
  • A much more lightweight solution is to use compass
  1. Install ruby
    • On CentOS 5.x you can use these instructions: www.deep-silver.com/…epository
    • Might need a newer version for bourbon but seems to work ok
    • gem install sass
    • gem install compass
  2. Make sure the root directory of the theme includes config.rb
    • If you are using 7.5, then copy it from 7.4 STARTER/config.rb
  3. Will need to install bourbon (for mixins)
    • gem install bourbon
    • cd to the root directory of the theme
    • bourbon install (creates a bourbon folder)
  4. Make sure any imports specify offset to _bourbon.scss, e.g.
    • Modify the themename.scss file to include:
    @import "../bourbon/bourbon";
  5. Start compass watching theme:
    • compass watch [path to directory containing config.rb]
    • or better to use cwatch script:
    • cwatch start path_to_watch
Topic: