Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 689 Bytes

README.md

File metadata and controls

46 lines (34 loc) · 689 Bytes

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