andrepolischuk / postcss-border

PostCSS plugin for border shortcut

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

PostCSS plugin for border shortcut

License:MIT License


Languages

Language:JavaScript 100.0%