PostCSS Sassy
PostCSS Sassy is a PostCSS plugin pack that allows you to use Sass-like markup in your CSS files.
The Sass syntax allows you to use variables, mixins, conditionals, and other goodies.
Variables
/* before */ $ /* after */
Conditionals
/* before */ @} /* after */
/* before */ @} /* after */
/* before */ @) } /* after */
Mixins
/* before */ @} /* after */
Imports
/* Before */ ; /* Contents of _base: `body { background: black; }` */ /* After */
Usage
You just need to follow these two steps to use PostCSS Sassy:
- Add PostCSS to your build tool.
- Add PostCSS Sassy as a PostCSS process.
npm install postcss-sassy --save-dev
Node
Grunt
Add Grunt PostCSS to your build tool:
npm install postcss-sassy --save-dev
Enable PostCSS Sassy within your Gruntfile:
grunt; grunt;
Differences between Sassy and Sass
...
Options
...