Posted by Snugug on October 31, 2011 at 4:29pm
Sassy System Stream Wrapper provides a function to call to create a SASS partial to be imported with functions to be called to get paths to modules, themes, and if Libraries API module is enabled, libraries.
Quick Start Instructions
- Enable SSSW module.
- In the module or theme you want to use SSSW in, add
sssw = DEFAULTto your .info file. - Go to
admin/config/development/ssswand press the "Rebuild SSSW Files" button. - Include the SSSW partial in your SASS file. By default, it will be in YOUR_MODULE_OR_THEME/sass/partials. The file is called _sssw.scss
- Call either the
sssw-theme,sssw-module, or thesssw-libraryfunction with the item's name and optional sub directory to get the absolute path to the requested item returned to you- Example Input:
background-image: url(sssw-theme('bartik', 'images/buttons.png'); - Example Output:
background-image: url("/sites/themes/bartik/images/buttons.png");
- Example Input:
- If modules or themes are added, or you need to generate the files for new modules or themes, simply go back to
admin/config/development/ssswand press the "Rebuild SSSW Files" button.
If you would like to change the path where the sssw partial will be placed, change the DEFAULT in sssw = DEFAULT to the relative path you want without trailing or preceding slashes. For instance, if you wanted the file to live in YOUR_MODULE/sass/global_partials/_sssw.scss, you would put this in your .info file: sssw = sass/global_partials.
Downloads
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 4 sites currently report using this module. View usage statistics.
- Downloads: 32
- Last modified: December 19, 2011