Skip to content

andrepolischuk/postcss-border

Repository files navigation

postcss-border Build Status

PostCSS plugin for border shortcut

/* before */

.hello {
  border: 1px 0 solid #000;
}

/* after */

.hello {
  border: 1px solid #000;
  border-width: 1px 0;
}

Install

npm install --save-dev postcss-border

Usage

PostCSS

var fs = require('fs');
var postcss = require('postcss');
var border = require('postcss-border');
var css = fs.readFileSync('input.css', 'utf8');

var output = postcss([border])
  .process(css)
  .css;

Gulp

var gulp = require('gulp');
var postcss = require('gulp-postcss');
var border = require('postcss-border');

gulp.task('css', function () {
  return gulp.src('./src')
    .pipe(postcss([
      border
    ]))
    .pipe(gulp.dest('./dist'));
});

License

MIT