Brings the power of sass stylesheets to symfony
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



sfSassyCssPlugin brings the power of sass stylesheets to symfony

**WARNING: This plugin is in an alpha state. Use with caution ! **


  • PHP 5.2.4+
  • Symfony 1.3 or 1.4


Installing the sass compiler

Follow the instructions.

For linux users, you might have to symlink the sass compiler to a place inside your PATH.

Installing sfSassyCssPlugin using git

$ cd /path/to/symfony/project
$ git clone git:// plugins/sfSassyCssPlugin

If your project already uses git, you can add the plugin as a submodule:

$ cd /path/to/symfony/project
$ git submodule add git:// plugins/sfSassyCssPlugin
$ git submodule update --init
$ git commit -a -m "added sfSassyCssPlugin submodule"

Do not forget to publish the plugin assets:

$ symfony plugin:publish-assets

Enabling the plugin

Edit your config/ProjectConfiguration.class.php file to enable the plugin:

class ProjectConfiguration extends sfProjectConfiguration
  public function setup()
      // ... other plugin(s)



The default configuration can be found in the app.yml configuration file inside the plugin config folder:

    enabled:          false               # Wether to trigger sass compilation
    input_dir:        %SF_DATA_DIR%/sass  # Sass source folder
    output_dir:       %SF_WEB_DIR%/css    # Target folder where to generate the files
    format:           scss                # Input format: scss, sass
    include_dirs:     []                  # Array of sass import path.
    cache:            true                # Wether to use the cache
    cache_dir:        %SF_CACHE_DIR%/sass # The path to put cached Sass files
    trace:            false               # Show a full traceback on error
    style:            compact             # Output style: nested, compact, compressed, or expanded.
    debug_info:       false               # Emit extra information in the generated CSS that can be used by the FireSass Firebug plugin.
    line_numbers:     false               # Emit comments in the generated CSS indicating the corresponding sass line.
    line_comments:    false
    toolbar:          false               # Wether to display the debug toolbar

    enabled:          true                # Wether to trigger sass compilation
    style:            expanded            # Output style: nested, compact, compressed, or expanded.
    toolbar:          true                # Wether to display the debug toolbar


Using the default configuration the plugin will compile the sass stylesheets in the data/sass folder into css stylesheets in the web/css folder. The input and output folders can be customized in the project/application app.yml.

In development

Using the default configuration the sass stylesheets are generated on each request. The sass built-in cache helps speeding up the processing.

In production

No automatic compilation is done in production with the default configuration for obvious speed reasons.

You should run the sass:compile task instead in order to re-generate your css files.

Authors and contributors


You can use sass-convert to help you convert less stylesheets to sass.

##Changelog ##

v0.1.2 - 2012-02-08

  • Fix to support Ruby 1.9+

v0.1.1 - 2010-08-27

  • Fix for windows tested on win 7

v0.1.0 - 2010-08-17

  • Initial release