This is a theoretical question as much as a practical one. I just can’t wrap my head around how all these technologies mesh…
I have heard various things including:
- “HAML and SASS are included in Merb”
- “SASS is part of HAML”
- “HAML works in Merb, but to use SASS you need to add the ‘merb-haml’ dependency”(?)
- “You need Compass to run SASS in Merb”
- http://haml-lang.com/docs/yardoc/ (search for “merb”)
- https://github.com/Compass/compass/wiki/merb-integration
So my question is: …WHAT??
I do have SASS working in Merb. I have installed Compass and used the instructions on Chris Eppstein’s Github wiki to get it working. But why is Compass needed, and why do many sources seem to think that it is not needed and SASS support is built into HAML or Merb?
No, they are separate.
Sass and Haml, while technically pretty different libraries, come bundled together. They are both part of the
hamlgem. So you need to install that gem to use Sass. Note that that doesn’t require you to actually use Haml in your application.It’s actually the other way round. You can use Haml in merb by installing the
merb-hamlgem. This adds Haml-specific merb generators and plugs into merbs templating. Sass however only requires thehamldependency (in config/dependencies.rb) for it to work with merb.Not true. Compass is a framework built on top of Sass. It has tons of general purpose functions for CSS styling. But you don’t need Compass to use Sass. You can take a look at the docs.