Skip to content

PostCSS plugin for targeting all button elements with :any-button selector

License

Notifications You must be signed in to change notification settings

andrepolischuk/postcss-pseudo-class-any-button

Repository files navigation

postcss-pseudo-class-any-button Build Status

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

About

PostCSS plugin for targeting all button elements with :any-button selector

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published