npm.io
1.0.0 • Published 9 years ago

postcss-rgb

Licence
MIT
Version
1.0.0
Deps
2
Vulns
6
Weekly
0
Stars
3

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

Keywords