postcss-rgb
v1.0.0
Published
A postcss plugin to use rgb and rgba with hex values
Downloads
2,404
Readme
A PostCSS plugin to use rgb and rgba with hex values
Installation
npm install postcss-rgb
Example
div {
background: rgba(black, 0.4)
}
will produce
div {
background: rgba(0, 0, 0, 0.4);
}
Usage
Using Gulp.
var gulp = require('gulp'),
postcss = require('gulp-postcss'),
rgb = require('postcss-rgb');
gulp.task('css', function() {
gulp.src('path/to/dev/css').
.pipe(postcss({
rgb
}))
.pipe(gulp.dest('path/to/build/css'));
});
// rest of the gulp file