postcss-border-shortcut

1.0.0 • Public • Published

postcss-border-shortcut Build Status NPM Version Dependency Status

PostCSS plugin for assign default border type if not expressed.

/* Before */
 
.one {
  border: 1px #E7E7E7;
}
 
.two {
  border-top: 1px #707C80;
}
 
.three {
  border-bottom: #423424;
}
 
/* After */
 
.one {
  border: 1px solid #E7E7E7;
}
 
.two {
  border-top: 1px solid #707C80;
}
 
.three {
  border-bottom: 1px solid #423424;
}

Installation

$ npm install postcss-border-shortcut --save-dev

Usage

JS API

const postcss = require('postcss');
postcss([ require('postcss-border-shortcut') ])

See PostCSS docs for other examples.

Options

borderType

Type: string Default: solid

You can define a default borderstyle property, like: solid, dashed, dotted, double, ect...

// Set in build tool, etc.
.border({
  borderType: 'dashed'
})

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00
0.1.00
0.0.60
0.0.50
0.0.41
0.0.30
0.0.20
0.0.11

Package Sidebar

Install

npm i postcss-border-shortcut

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.64 kB

Total Files

7

Last publish

Collaborators

  • michelemazzucco