Experimental project

This is a sandbox project, which contains experimental code for developer use only.

The Sass Snippets module provides a text filter which uses the scssphp compiler for SCSS to generate css versions of SCSS code snippets. The older sass "indented syntax" is not supported.

This module requires the scssphp library.

The scssphp library should be placed in a folder called scssphp inside your libraries folder. Eg:

sites/all/libraries/scssphp/scss.inc.php

Installation

  • Download an enable the module.
  • Ensure the scssphp library is present (see above)
  • Any additional sass libraries (such as Compass) that are present can be added to the 'Import paths' in the module configuration page: admin/config/content/sass-snippets. Tested and partially working with compass 0.12.2. Folders containing .scss files can also be imported.
  • Enable the Sass Snippets filter on one of your text formats at /admin/config/content/formats
  • Insert SCSS into a <pre> tag with the class sass-snippet. Example:
<pre class="sass-snippet">
  $color: tomato;
  div { 
    color: lighten($color, 20%); 
  }
</pre>

Project Information