Compass vs Bourbon Frameworks

alik picture alik · Oct 5, 2011 · Viewed 12k times · Source

Im working on a rails 3.1 application. I want to have a framework/library that covers gradients, shadows etc. Compass has been popular, but getting it to play nicely with rails 3.1 was a challenge for me, so I opted for Bourbon, which also seems to be getting popular. I am wondering what the main differences are between Compass and Bourbon. Or if there is a different framework that you use, please share that.

  • Why would you prefer one framework over the other?
  • Have you experienced with any of them compatibility issues with browsers or with versions of rails etc.?
  • Which one has a bigger or better library of mixins?

Answer

Wolfram Arnold picture Wolfram Arnold · Feb 14, 2012

I had the same question and I researched it a bit more, installed both Compass and Bourbon and wound up with Bourbon, for the following reasons:

  1. Compass didn't cleanly install with Rails 3.1. It seemed a lot more invasive, needed configuration files (why?) and generally felt it had more dependencies to a specific way of doing things than just providing a CSS framework.
  2. Bourbon was super simple for Rails 3.1, and worked out of the box. The documentation was most straightforward, although I had to catch myself up on CSS3 box models first (which was easy to do--the top results on Google were right on the money). By contrast, I got lost in the Compass documentation right off the bat, and I wasn't sure what I needed and what not, there were so many pieces to it, I was afraid that it could take a long time to figure it out.
  3. Bourbon is a more recent development and seems to bank on CSS3 a lot. I would not give too much creed to one of the other answers that because Bourbon doesn't have as much activity yet it should be discarded. I have a feeling that Bourbon is the new vanguard and that it'll attract more activity as the more established Compass is losing activity. The new kid on the block isn't quite as popular at first, but that's a poor measure for long-term usefulness.
  4. If you can live without legacy browsers that don't do CSS3, then Bourbon is probably a good choice. For legacy support there are also various JS solutions available that teach the old browsers the necessary tricks.
  5. For the first time in many years as developer, Bourbon took away the fear of touching CSS. Try it with Flutie to get some basic layouts out of the box.