PostCSS Sassy Mixins
PostCSS plugin for sass-like mixins.
Installation
npm install postcss-sassy-mixins
Usage
var postcss = ;var mixins = ; var options = // options here; var output = css;
@)
Turns into:
Options
mixins
Type: Object
Object of mixins. The mixin can either be a function or an object.
mixins: clearfix: '&::after': content: '""' display: 'table' clear: 'both' { rule; }
mixinsDir
Type: string|string[]
Autoload all mixins from one or more directories. The name of the mixin will be taken from file name.
// gulpfile.js mixinsDir: path // mixins/clearfix.js moduleexports = '&::after': content: '""' display: 'table' clear: 'both'
mixinsFiles
Type: string|string[]
Similar to mixinsDir
, except you provide
glob syntax to target or not target
specific files.
mixinsFiles: path
silent
Type: boolean
Remove unknown mixins and do not throw a error. Default is false
.