Gathering detailed insights and metrics for @csstools/postcss-logical-viewport-units
Gathering detailed insights and metrics for @csstools/postcss-logical-viewport-units
Gathering detailed insights and metrics for @csstools/postcss-logical-viewport-units
Gathering detailed insights and metrics for @csstools/postcss-logical-viewport-units
PostCSS Tools and Plugins
npm install @csstools/postcss-logical-viewport-units
Typescript
Module System
Min. Node Version
Node Version
NPM Version
CSS (43.36%)
JavaScript (30.33%)
TypeScript (22.68%)
HTML (3.06%)
Nunjucks (0.48%)
Shell (0.1%)
Total Downloads
98,957,735
Last Day
262,567
Last Week
1,427,019
Last Month
6,203,869
Last Year
60,085,789
MIT-0 License
959 Stars
4,266 Commits
75 Forks
9 Watchers
4 Branches
130 Contributors
Updated on May 05, 2025
Minified
Minified + Gzipped
Latest Version
3.0.3
Package Id
@csstools/postcss-logical-viewport-units@3.0.3
Unpacked Size
9.16 kB
Size
3.66 kB
File Count
7
NPM Version
10.7.0
Node Version
22.1.0
Published on
Nov 01, 2024
Cumulative downloads
Total Downloads
Last Day
35.7%
262,567
Compared to previous day
Last Week
1.8%
1,427,019
Compared to previous week
Last Month
-4%
6,203,869
Compared to previous month
Last Year
71.3%
60,085,789
Compared to previous year
2
1
npm install @csstools/postcss-logical-viewport-units --save-dev
PostCSS Logical Viewport Units lets you easily use vb
and vi
length units following the CSS-Values-4 Specification.
1.foo { 2 margin: 10vi 20vb; 3} 4 5/* becomes */ 6 7.foo { 8 margin: 10vw 20vh; 9 margin: 10vi 20vb; 10}
Add PostCSS Logical Viewport Units to your project:
1npm install postcss @csstools/postcss-logical-viewport-units --save-dev
Use it as a PostCSS plugin:
1const postcss = require('postcss'); 2const postcssLogicalViewportUnits = require('@csstools/postcss-logical-viewport-units'); 3 4postcss([ 5 postcssLogicalViewportUnits(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
The inlineDirection
option allows you to specify the direction of the inline axe. The default value is left-to-right
, which would match any latin language.
You should tweak this value so that it is specific to your language and writing mode.
1postcssLogicalViewportUnits({
2 inlineDirection: 'top-to-bottom'
3})
1.foo { 2 margin: 10vi 20vb; 3} 4 5/* becomes */ 6 7.foo { 8 margin: 10vh 20vw; 9 margin: 10vi 20vb; 10}
Each direction must be one of the following:
top-to-bottom
bottom-to-top
left-to-right
right-to-left
Please do note that transformations won't do anything particular for right-to-left
or bottom-to-top
.
The preserve
option determines whether the original notation
is preserved. By default, it is preserved.
1postcssLogicalViewportUnits({ preserve: false })
1.foo { 2 margin: 10vi 20vb; 3} 4 5/* becomes */ 6 7.foo { 8 margin: 10vw 20vh; 9}
No vulnerabilities found.
Reason
30 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
SAST tool detected but not run on all commits
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-05-05
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