This project is not covered by Drupal’s security advisory policy.
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 = DEFAULT
to your .info file. - Go to
admin/config/development/sssw
and 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-library
function 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/sssw
and 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
.
Project information
- 122 sites report using this module
- Created by Snugug on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.