postcss-shades-of-gray
v0.0.1
Published
PostCSS Plugin to replace grayscale color to the closest one in a provided set of grays. It helps making the CSS more consistent to design guidelines.
Downloads
7
Maintainers
Readme
PostCSS Shades Of Gray
PostCSS Plugin to replace grayscale color to the closest one in a provided set of grays. It helps making the CSS more consistent to design guidelines.
.foo {
color: #ACACAC;
}
.foo {
color: #BBBBBB;
}
Usage
var gulp = require('gulp');
var postcss = require('postcss');
var post = require('gulp-postcss');
var shades = require('postcss-shades-of-gray');
postcss().use(shades);
gulp.task('default', function() {
var postcss = require('gulp-postcss');
return gulp.src('src/css/*.css')
.pipe(post([shades({
shades: ['#FFFFFF', '#BBBBBB', '#444444', '#000000'],
normalizeHexaTo6: true
})]))
.pipe(gulp.dest('build/'));
});
See PostCSS docs for examples for your environment.