postcss-palette
v0.0.1
Published
PostCSS plugin for colors management using external palettes
Downloads
5
Maintainers
Readme
PostCSS Palette
PostCSS plugin for colors management using external palettes.
Example
/* palette.js */
module.exports = {
red: '#fa1200',
green: '#1f0',
blue: 'rgb(0, 42, 240)'
}
var palette = require('postcss-palette');
postcss([ palette({ palette: require('/path/to/palette') }) ]);
.foo {
background-color: red;
color: green;
text-shadow: 0 0 5px blue;
box-shadow: 0 0 5px blue;
border-color: green;
}
.foo {
background-color: #fa1200;
color: #1f0;
text-shadow: 0 0 5px rgb(0, 42, 240);
box-shadow: 0 0 5px rgb(0, 42, 240);
border-color: #1f0;
}
Usage
postcss([ require('postcss-palette') ])
See PostCSS docs for examples for your environment.