README.md

sprockets-sass

When using Sprockets 2.x with Sass you will eventually run into a pretty big issue. //= require directives will not allow Sass mixins, variables, etc. to be shared between files. So you'll try to use @import, and that'll also blow up in your face. sprockets-sass fixes all of this by creating a Sass::Importer that is Sprockets aware.

Note: This works in Rails 3.1, thanks to the sass-rails gem. But if you want to use Sprockets and Sass anywhere else, like Sinatra, use sprockets-sass.

Features

Imports Sass partials (filenames prepended with "_").

Import paths work exactly like require directives.

Imports either Sass syntax, or just regular CSS files.

Imported files are preprocessed by Sprockets, so .css.scss.erb files can be imported.
Directives from within imported files also work as expected.

Automatic integration with Compass.

Supports glob imports, like sass-rails.

Asset path Sass functions. New in 0.4!

Installation

$ gem install sprockets-sass

Usage

In your Rack application, setup Sprockets as you normally would, and require "sprockets-sass":