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;
}
$ npm install postcss-border-shortcut --save-dev
const postcss = require('postcss');
postcss([ require('postcss-border-shortcut') ])
See PostCSS docs for other examples.
Type: string
Default: solid
You can define a default border
style property, like: solid
, dashed
, dotted
, double
, ect...
// Set in build tool, etc.
.border({
borderType: 'dashed'
})