Gathering detailed insights and metrics for @csstools/postcss-stepped-value-functions
Gathering detailed insights and metrics for @csstools/postcss-stepped-value-functions
Gathering detailed insights and metrics for @csstools/postcss-stepped-value-functions
Gathering detailed insights and metrics for @csstools/postcss-stepped-value-functions
PostCSS Tools and Plugins
npm install @csstools/postcss-stepped-value-functions
Typescript
Module System
Min. Node Version
Node Version
NPM Version
97.6
Supply Chain
95.7
Quality
89.6
Maintenance
100
Vulnerability
100
License
CSS (43.36%)
JavaScript (30.33%)
TypeScript (22.68%)
HTML (3.06%)
Nunjucks (0.48%)
Shell (0.1%)
Total Downloads
507,969,113
Last Day
786,602
Last Week
4,244,795
Last Month
17,140,258
Last Year
198,347,328
MIT-0 License
962 Stars
4,267 Commits
75 Forks
9 Watchers
6 Branches
130 Contributors
Updated on May 13, 2025
Minified
Minified + Gzipped
Latest Version
4.0.8
Package Id
@csstools/postcss-stepped-value-functions@4.0.8
Unpacked Size
6.81 kB
Size
2.84 kB
File Count
7
NPM Version
10.9.0
Node Version
22.12.0
Published on
Apr 19, 2025
Cumulative downloads
Total Downloads
Last Day
9.2%
786,602
Compared to previous day
Last Week
11.4%
4,244,795
Compared to previous week
Last Month
-5.6%
17,140,258
Compared to previous month
Last Year
8.5%
198,347,328
Compared to previous year
1
npm install @csstools/postcss-stepped-value-functions --save-dev
PostCSS Stepped Value Functions lets you use round
, rem
and mod
stepped value functions, following the CSS Values 4 specification.
1.test-functions { 2 padding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%); 3 transform: rotate(mod(-140deg, -90deg)); 4 top: round(15px, 4px); 5 right: round(nearest, 15px, 4px); 6 bottom: round(up, 15px, 7px); 7 left: round(down, 15px, 4px); 8 width: round(to-zero, 15px, 4px); 9} 10 11/* becomes */ 12 13.test-functions { 14 padding: 8px 3px 1px calc(3px + 50%); 15 transform: rotate(-50deg); 16 top: 16px; 17 right: 16px; 18 bottom: 21px; 19 left: 12px; 20 width: 12px; 21}
Add PostCSS Stepped Value Functions to your project:
1npm install postcss @csstools/postcss-stepped-value-functions --save-dev
Use it as a PostCSS plugin:
1const postcss = require('postcss'); 2const postcssSteppedValueFunctions = require('@csstools/postcss-stepped-value-functions'); 3 4postcss([ 5 postcssSteppedValueFunctions(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
Given the dynamic nature of custom properties it's impossible to know what the variable value is, which means the plugin can't compute a final value for the stylesheet.
Because of that, any usage that contains a var
is skipped.
The preserve
option determines whether the original notation
is preserved. By default, it is not preserved.
1postcssSteppedValueFunctions({ preserve: true })
1.test-functions { 2 padding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%); 3 transform: rotate(mod(-140deg, -90deg)); 4 top: round(15px, 4px); 5 right: round(nearest, 15px, 4px); 6 bottom: round(up, 15px, 7px); 7 left: round(down, 15px, 4px); 8 width: round(to-zero, 15px, 4px); 9} 10 11/* becomes */ 12 13.test-functions { 14 padding: 8px 3px 1px calc(3px + 50%); 15 padding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%); 16 transform: rotate(-50deg); 17 transform: rotate(mod(-140deg, -90deg)); 18 top: 16px; 19 top: round(15px, 4px); 20 right: 16px; 21 right: round(nearest, 15px, 4px); 22 bottom: 21px; 23 bottom: round(up, 15px, 7px); 24 left: 12px; 25 left: round(down, 15px, 4px); 26 width: 12px; 27 width: round(to-zero, 15px, 4px); 28}
No vulnerabilities found.
Reason
30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
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/23 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-12
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