Search code examples
ruby-on-railscssruby-on-rails-3.1compass-sassblueprint-css

Rails 3.1 and Stylesheet Frameworks


I am building an application in Rails 3.1 and I really like the whole SASS feature.

I looked at Compass recently and did also come across some debate discussing the need to use compass anymore in Rails 3.1. Frankly, the things that attracted me to compass were the ready made mixins like resetting the css to be compatible for all browsers, and things like linear gradient.

  1. Is Compass worth using in Rails 3.1? Key advantages?

  2. I am also curious about other frameworks out there. Which stylesheet framework is the most popular for Rails 3.1 keeping the new rails features in mind? What framework do you use or which would you recommend?

  3. I also saw Blueprint, and some articles detailing how to use Compass with Blueprint. What I don't understand is, if Compass is a framework and Blueprint is a framework, why would one want to use them both together and make a mess, why not stick to one. Frankly I like to keep things simple and stick one framework to do one job. Maybe I am missing some advantage here, please explain the advantages of doing so.

Any help will be much appreciated


Solution

  • The difference is the focus of each framework. Compass seems primarily focussed on providing shortcuts for common CSS patterns. It extends CSS with programmatic enhancements to simplify using common idioms. Compass is build on top of SASS.

    Blueprint provides boilerplate solutions for common CSS problems, but does not have functions like Compass that can be used to modify their behavior. It also has a grid system for laying out pages.

    You can use both together, and pick and choose what pieces suit.