Gathering detailed insights and metrics for postcss-browser-comments
Gathering detailed insights and metrics for postcss-browser-comments
Gathering detailed insights and metrics for postcss-browser-comments
Gathering detailed insights and metrics for postcss-browser-comments
npm install postcss-browser-comments
Typescript
Module System
Min. Node Version
Node Version
NPM Version
93.7
Supply Chain
94.6
Quality
81.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
776,088,028
Last Day
547,335
Last Week
3,053,803
Last Month
13,047,099
Last Year
159,461,812
MIT-0 License
960 Stars
4,266 Commits
75 Forks
9 Watchers
4 Branches
130 Contributors
Updated on May 09, 2025
Minified
Minified + Gzipped
Latest Version
6.0.1
Package Id
postcss-browser-comments@6.0.1
Unpacked Size
8.07 kB
Size
3.16 kB
File Count
7
NPM Version
10.7.0
Node Version
22.1.0
Published on
Sep 25, 2024
Cumulative downloads
Total Downloads
Last Day
45.9%
547,335
Compared to previous day
Last Week
5.9%
3,053,803
Compared to previous week
Last Month
-6.8%
13,047,099
Compared to previous month
Last Year
-6.1%
159,461,812
Compared to previous year
2
npm install postcss-browser-comments --save-dev
PostCSS Browser Comments lets you keep only the CSS you need based on comments and your browserslist.
1/** 2 * Prevent adjustments of font size after orientation changes in IE and iOS. 3 */ 4 5html { 6 -ms-text-size-adjust: 100%; 7 -webkit-text-size-adjust: 100%; 8} 9 10/* becomes */ 11 12
The comment and rule above would be removed with the following browserslist:
1last 2 chrome versions
The rule below would be more carefully altered:
1/** 2 * 1. Add the correct box sizing in Firefox. 3 * 2. Show the overflow in Edge and IE. 4 */ 5 6hr { 7 box-sizing: content-box; /* 1 */ 8 height: 0; /* 1 */ 9 overflow: visible; /* 2 */ 10} 11 12/* with a `last 2 firefox versions` browserslist becomes */ 13 14/** 15 * 1. Add the correct box sizing in Firefox. 16 * 2. Show the overflow in Edge and IE. 17 */ 18 19hr { 20 box-sizing: content-box; /* 1 */ 21 height: 0; /* 1 */ 22}
Add PostCSS Browser Comments to your project:
1npm install postcss postcss-browser-comments --save-dev
Use it as a PostCSS plugin:
1const postcss = require('postcss'); 2const postcssBrowserComments = require('postcss-browser-comments'); 3 4postcss([ 5 postcssBrowserComments(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
The browsers
option overrides of the project’s browserslist.
1postcssBrowserComments({ browsers: 'last 2 versions' })
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