postcss-conditionals
PostCSS plugin that enables @if
statements in your CSS.
Installation
npm install postcss-conditionals
Usage
var fs = ;var postcss = ;var conditionals = ; var css = fs; var output = css;
Using this input.css
:
@}
you will get:
Also works well with postcss-simple-vars:
$ @ @ @}
and with postcss-for:
@ }}
Development
- Clone repository
- Install dependencies
npm install
- If
parser.jison
file has been changed, regenerateparser.js
by runningnpm run gen-parser