Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michelemazzucco/postcss-border-shortcut
PostCSS plugin for assign default border type if not expressed.
https://github.com/michelemazzucco/postcss-border-shortcut
postcss postcss-border-shortcut postcss-plugins
Last synced: 3 days ago
JSON representation
PostCSS plugin for assign default border type if not expressed.
- Host: GitHub
- URL: https://github.com/michelemazzucco/postcss-border-shortcut
- Owner: michelemazzucco
- License: mit
- Created: 2016-05-17T16:24:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-30T17:06:36.000Z (almost 7 years ago)
- Last Synced: 2024-04-25T06:43:34.909Z (9 months ago)
- Topics: postcss, postcss-border-shortcut, postcss-plugins
- Language: JavaScript
- Homepage:
- Size: 84 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-border-shortcut [![Build Status][ci-img]][ci] [![NPM Version][npm-img]][npm] [![Dependency Status][david-dm-img]][david-dm]
PostCSS plugin for assign default border type if not expressed.
```css
/* 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
```js
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 `border`style property, like: `solid`, `dashed`, `dotted`, `double`, ect...
```js
// Set in build tool, etc.
.border({
borderType: 'dashed'
})
```[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/michelemazzucco/postcss-border-shortcut.svg
[ci]: https://travis-ci.org/michelemazzucco/postcss-border-shortcut
[npm]: https://www.npmjs.com/package/postcss-border-shortcut
[npm-img]: https://img.shields.io/npm/v/postcss-border-shortcut.svg
[david-dm]: https://david-dm.org/michelemazzucco/postcss-border-shortcut
[david-dm-img]: https://david-dm.org/michelemazzucco/postcss-border-shortcut.svg