Installations
npm install postcss-short-border
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=6.0.0
Node Version
10.11.0
NPM Version
6.4.1
Score
70.9
Supply Chain
98.9
Quality
79.1
Maintenance
50
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
CSS (71.5%)
JavaScript (28.5%)
Developer
Download Statistics
Total Downloads
1,346,497
Last Day
155
Last Week
1,083
Last Month
12,234
Last Year
134,816
GitHub Statistics
6 Stars
5 Commits
2 Forks
5 Watching
1 Branches
6 Contributors
Bundle Size
74.96 kB
Minified
20.56 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.0.0
Package Id
postcss-short-border@4.0.0
Size
6.93 kB
NPM Version
6.4.1
Node Version
10.11.0
Publised On
10 Oct 2018
Total Downloads
Cumulative downloads
Total Downloads
1,346,497
Last day
-55.6%
155
Compared to previous day
Last week
-63.7%
1,083
Compared to previous week
Last month
-3.5%
12,234
Compared to previous month
Last year
-33.1%
134,816
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
PostCSS Short Border
PostCSS Short Border lets you omit sides within border-
properties in CSS.
It also lets you fully define individual values on the border
property using
dividers (/
).
1.example-1 { 2 border-color: blue blue *; 3} 4 5.example-2 { 6 border-width: 1px *; 7} 8 9.example-3 { 10 border: 1px 2px / solid / red orange; 11} 12 13/* becomes */ 14 15.example-1 { 16 border-top-color: blue; 17 border-right-color: blue; 18 border-left-color: blue; 19} 20 21.example-2 { 22 border-top-width: 1px; 23 border-bottom-width: 1px; 24} 25 26.example-3 { 27 border-width: 1px 2px; 28 border-style: solid; 29 border-color: red orange; 30}
Usage
Add PostCSS Short Border to your project:
1npm install postcss-short-border --save-dev
Use PostCSS Short Border to process your CSS:
1const postcssShortBorder = require('postcss-short-border'); 2 3postcssShortBorder.process(YOUR_CSS /*, processOptions, pluginOptions */);
Or use it as a PostCSS plugin:
1const postcss = require('postcss'); 2const postcssShortBorder = require('postcss-short-border'); 3 4postcss([ 5 postcssShortBorder(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
PostCSS Short Border runs in all Node environments, with special instructions for:
Node | PostCSS CLI | Webpack | Create React App | Gulp | Grunt |
---|
Options
prefix
The prefix
option defines a prefix required by properties being transformed.
Wrapping dashes are automatically applied, so that x
would transform
-x-border
.
1postcssShortBorder({ prefix: 'x' });
1.example-1 { 2 -x-border-color: blue blue *; 3} 4 5/* becomes */ 6 7.example-1 { 8 border-top-color: blue; 9 border-right-color: blue; 10 border-left-color: blue; 11}
skip
The skip
option defines the skip token used to ignore portions of the
shorthand.
1postcssShortBorder({ skip: '-' });
1.example-1 { 2 border-color: blue blue -; 3} 4 5/* becomes */ 6 7.example-1 { 8 border-top-color: blue; 9 border-right-color: blue; 10 border-left-color: blue; 11}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: Creative Commons Zero v1.0 Universal: LICENSE.md:0
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More