postcss-rgb

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i postcss-rgb

Weekly Downloads

603

Version

1.0.0

License

MIT

Last publish

Collaborators

  • arpadhegedus