postcss-pseudo-class-any-button
v0.1.5
Published
PostCSS plugin for targeting all button elements with :any-button selector
Downloads
20
Maintainers
Readme
postcss-pseudo-class-any-button
PostCSS plugin for targeting all button elements with
:any-button
selector
/* before */
.form :any-button {
border: 0;
}
/* after */
.form button,
.form input[type="button"],
.form input[type="reset"],
.form input[type="submit"] {
border: 0;
}
Install
npm install --save-dev postcss-pseudo-class-any-button
Usage
PostCSS
var fs = require('fs');
var postcss = require('postcss');
var anyButton = require('postcss-pseudo-class-any-button');
var css = fs.readFileSync('input.css', 'utf8');
var output = postcss([anyButton])
.process(css)
.css;
Gulp
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var anyButton = require('postcss-pseudo-class-any-button');
gulp.task('css', function () {
return gulp.src('./src')
.pipe(postcss([
anyButton
]))
.pipe(gulp.dest('./dist'));
});
License
MIT