Sass is another CSS-preprocessor like less.
Compass is a authoring Framework for Sass
It's maybe a matter of taste, maybe one Preprocessor/CSS-Framework is more powerful. Just read the following Comparisons and decide for yourself.
Compass / Sass needs a running ruby gem installation.
If you are using FreeBSD, you can install Compass directly via the Port, which also installs the dependencies on ruby:
cd /usr/ports/textproc/rubygem-compass && make install
Install Instructions for Ubuntu: http://www.ubuntulinuxhelp.com/installing-compass-on-ubuntu/
You can also install Sass or Compass via ruby gem (if that's already installed):
gem install sass
or
gem install compass
Here is an example configuration for your app/config.yml:
assetic:
filters:
cssrewrite: ~
sass:
bin: /usr/local/bin/sass
apply_to: "\.sass$"
scss:
sass: /usr/local/bin/sass
apply_to: "\.scss$"
yui_css:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
apply_to: "\.css$"
yui_js:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
You can also use Compass to parse .sass and .scss Files:
assetic:
filters:
cssrewrite: ~
compass:
sass: /usr/local/bin/compass
apply_to: "\.(scss|sass)$"
yui_css:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
apply_to: "\.css$"
yui_js:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
Just use the usual twig/assetic tag for scripts
{% stylesheets filter='?yui_css'
'@MopaBootstrapBundle/Resources/public/sass/mopabootstrapbundle.scss'
%}