Gathering detailed insights and metrics for postcss-csso
Gathering detailed insights and metrics for postcss-csso
Gathering detailed insights and metrics for postcss-csso
Gathering detailed insights and metrics for postcss-csso
npm install postcss-csso
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
120 Stars
76 Commits
6 Forks
2 Watchers
3 Branches
3 Contributors
Updated on Jun 25, 2025
Latest Version
6.0.1
Package Id
postcss-csso@6.0.1
Unpacked Size
16.89 kB
Size
4.07 kB
File Count
9
NPM Version
8.15.0
Node Version
18.7.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
PostCSS plugin to minify CSS using CSSO (a CSS minifier with structural optimizations).
Under the hood, the plugin converts PostCSS
AST into CSSO
's AST, optimises it and converts back. The plugin uses PostCSS
's input AST nodes (or their clones) on back convertation, so the shape of the original PostCSS
's nodes is preserved after the compression in most cases (e.g. properties added by other plugins aren't lost). This approach makes it possible to achieve great performance and correct source maps generation.
The performance of postcss-csso
is approximately the same as CSSO
has itself (see CSSO
numbers in minifiers comparison table).
If you have any difficulties with the output of this plugin, please use the CSSO tracker.
npm install postcss-csso
1import postcss from 'postcss'; 2import csso from 'postcss-csso'; 3// CommonJS: 4// const csso = require('postcss-csso'); 5 6postcss([ csso]) 7 .process('.a { color: #FF0000; } .b { color: rgba(255, 0, 0, 1) }') 8 .then((result) => { 9 console.log(result.css); 10 // .a,.b{color:red} 11 });
Plugin takes the same options as compress()
method of CSSO with no exception.
1postcss([ 2 csso({ restructure: false }) 3]) 4 .process('.a { color: #FF0000; } .b { color: rgba(255, 0, 0, 1) }') 5 .then((result) => { 6 console.log(result.css); 7 // .a{color:red}.b{color:red} 8 });
Using in postcss.config.js
:
1import csso from 'postcss-csso'; 2 3export const plugins = [ 4 csso({ 5 restructure: false 6 }) 7];
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 1/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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