Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compass vs Bourbon Frameworks [closed]

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?
like image 438
alik Avatar asked Oct 05 '11 19:10

alik


2 Answers

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.
like image 115
Wolfram Arnold Avatar answered Oct 01 '22 13:10

Wolfram Arnold


So, I took a quick look at the Bourbon documentation and it looks like it's a much simpler, much smaller version of something like Compass. It's true that the most commonly used stuff in Compass is the CSS3 mixins but there's more to Compass than just that. In particular, I'd look at the spriting support and support for multiple elements like gradient backgrounds and box-shadows to see if that's something you'd like.

While Bourbon has the basics covered, there's some really nice edge cases that Compass takes care of. For instance, I often use the sticky-footer mixin.

like image 40
Ben Johnson Avatar answered Oct 01 '22 11:10

Ben Johnson