postcss-closure-variables
1.0.2 • Public • Published PostCSS Closure Variables
PostCSS plugin to enable GWT/Closure stylesheet variables with conditionals.
Examples
Standard usage
@def BLUE_500 #00a6fb;
.foo {
color: BLUE_500;
}
With conditionals
@def VALUE 4;
@if(VALUE < 3) {
@def COLOR blue;
} @elseif(VALUE < 5) {
@def COLOR red;
} @else {
@def COLOR black;
}
body {
background-color: COLOR;
}
body {
background-color: red;
}
Usage
postcss([ require('postcss-closure-variables') ])
See PostCSS docs for examples for your environment.
Versions
Current Tags
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.2 | 2 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.2 | 2 | |
1.0.1 | 0 | |
1.0.0 | 0 | |
Package Sidebar
Install
npm i postcss-closure-variables
Weekly Downloads