1.0.0 • Published 7 years ago

postcss-extends v1.0.0

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

A PostCSS plugin to extend simple rules

Installation

npm install postcss-extends

Example

a { color: blue }
a:hover { color: red }
div { extends: a }

will produce

a { color: blue }
a:hover { color: red }
div { color: blue }
div:hover { color: red }

Usage

Using Gulp.

var gulp            = require('gulp'),
    postcss         = require('gulp-postcss'),
    extends        = require('postcss-extends');

gulp.task('css', function() {
    gulp.src('path/to/dev/css').
        .pipe(postcss({
            // use it after nesting plugins
            extends
        }))
        .pipe(gulp.dest('path/to/build/css'));
});

// rest of the gulp file