Search code examples
ruby-on-rails-3sassruby-on-rails-3.1blueprint-csscompass-sass

What is the value of Compass for Rails 3.1?


I'm trying to decide if I should include Compass when starting a new Rails 3.1 project. I haven't used Compass before.

Rails 3.1 now supports SCSS directly. The Rails 3.1 asset pipeline (via sprockets) now compiles stylesheets automatically. And I can use a SCSS version of a CSS framework such as Blueprint directly.

What benefits will I get from using Compass with Rails 3.1?


Solution

  • Bourbon (by Thoughtbot) is a light alternative to compass that integrates well with rails 3.1.

    It has the main css3 mixins you get with compass (background-images, box shadow, border radius, gradients...). It also has helpers to style buttons, "gridify" your layout and a few more goodies.

    You might miss some of the power features compass has, but that can be easily overcome with the power of sass : just copy/create you're own mixin!

    Compass often gave me headaches when upgrading my rails app. I appreciate the simplicty of Bourbon (although it might give you headaches as well... in the morning :-) )