Installations
npm install postcss-short-position
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=6.0.0
Node Version
10.11.0
NPM Version
6.4.1
Score
72.3
Supply Chain
98.9
Quality
78.9
Maintenance
50
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (50.36%)
CSS (49.64%)
Developer
Download Statistics
Total Downloads
1,418,786
Last Day
167
Last Week
1,143
Last Month
13,031
Last Year
148,105
GitHub Statistics
6 Stars
7 Commits
2 Forks
5 Watching
1 Branches
6 Contributors
Bundle Size
75.26 kB
Minified
20.68 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.0.1
Package Id
postcss-short-position@4.0.1
Size
7.20 kB
NPM Version
6.4.1
Node Version
10.11.0
Publised On
10 Oct 2018
Total Downloads
Cumulative downloads
Total Downloads
1,418,786
Last day
-53.4%
167
Compared to previous day
Last week
-62.9%
1,143
Compared to previous week
Last month
-6.2%
13,031
Compared to previous month
Last year
-27.5%
148,105
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
PostCSS Short Position
PostCSS Short Position lets define sides within the position
property in
CSS.
1.header { 2 position: fixed 0 1em *; 3} 4 5/* becomes */ 6 7.header { 8 top: 0; 9 right: 1em; 10 left: 1em; 11 position: fixed; 12}
The position
declaration can be extended with the 1-to-4 syntax to target
top
, right
, bottom
, and left
. Sides can be omitted using the skip token.
Usage
Add PostCSS Short Position to your project:
1npm install postcss-short-position --save-dev
Use PostCSS Short Position to process your CSS:
1const postcssShortPosition = require('postcss-short-position'); 2 3postcssShortPosition.process(YOUR_CSS /*, processOptions, pluginOptions */);
Or use it as a PostCSS plugin:
1const postcss = require('postcss'); 2const postcssShortPosition = require('postcss-short-position'); 3 4postcss([ 5 postcssShortPosition(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
PostCSS Short Position 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-position
.
1postcssShortPosition({ prefix: 'x' });
1.header { 2 x-position: fixed 0 1em *; 3} 4 5/* becomes */ 6 7.header { 8 top: 0; 9 right: 1em; 10 left: 1em; 11 position: fixed; 12}
skip
The skip
option defines the skip token used to ignore portions of the
shorthand.
1postcssShortPosition({ skip: '-' });
1.header { 2 position: fixed 0 1em -; 3} 4 5/* becomes */ 6 7.header { 8 top: 0; 9 right: 1em; 10 left: 1em; 11 position: fixed; 12}
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
Found 0/7 approved changesets -- score normalized to 0
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
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