PostCSS plugin for border shortcut
/* before */
.hello {
border: 1px 0 solid #000;
}
/* after */
.hello {
border: 1px solid #000;
border-width: 1px 0;
}
npm install --save-dev postcss-border
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;
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'));
});
MIT