1.0.0 • Published 7 years ago

postcss-rgb v1.0.0

Weekly downloads
143
License
MIT
Repository
github
Last release
7 years ago

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