0.0.4 • Published 8 years ago

gulp-prefix-css v0.0.4

Weekly downloads
86
License
MIT
Repository
github
Last release
8 years ago

gulp-prefix-css

Dependency Status

Gulp plugin to prefix your CSS selectors

Usage

First things first, install as a dev-dependency

$ npm i --save-dev gulp-prefix-css

then, in your gulpfile.js add something like this:

var prefixCSS = require('gulp-prefix-css');

gulp.task('prefix-css', function(){
  return gulp.src('./*.css')
    .pipe(prefixCss('.prefix'))
    .pipe(gulp.dest('./dist'));
});

Example output

Given the gulp task above and this input file:

.test {
  display: block;
}

.test-2 {
  font-weight: 400;
}

This output would be generated by the plugin:

.prefix .test {
  display: block;
}

.prefix .test-2 {
  font-weight: 400;
}