Gathering detailed insights and metrics for postcss-normalize
Gathering detailed insights and metrics for postcss-normalize
Gathering detailed insights and metrics for postcss-normalize
Gathering detailed insights and metrics for postcss-normalize
postcss-normalize-url
Normalize URLs with PostCSS
postcss-normalize-charset
Add necessary or remove extra charset with PostCSS
postcss-normalize-string
Normalize wrapping quotes for CSS string literals.
postcss-normalize-positions
Normalize keyword values for position into length values.
Use the parts of normalize.css (or sanitize.css) you need from your browserslist
npm install postcss-normalize
Typescript
Module System
Min. Node Version
Node Version
NPM Version
CSS (79.04%)
JavaScript (20.96%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
CC0-1.0 License
833 Stars
46 Commits
39 Forks
17 Watchers
2 Branches
10 Contributors
Updated on Jul 10, 2025
Latest Version
13.0.1
Package Id
postcss-normalize@13.0.1
Unpacked Size
29.26 kB
Size
7.38 kB
File Count
5
NPM Version
10.8.3
Node Version
20.17.0
Published on
Sep 25, 2024
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
2
5
PostCSS Normalize lets you use the parts of normalize.css or sanitize.css that you need from your browserslist.
1@import "normalize.css";
1@import "sanitize.css";
PostCSS Normalize uses a non-opinionated version of normalize.css, but an opinionated version may also be used.
1@import "normalize.css/opinionated.css";
Here is a sample of what normalize.css looks like when the browserslist
is ie >= 9
:
1/** 2 * Add the correct display in IE 9-. 3 */ 4 5audio, 6video { 7 display: inline-block; 8} 9 10/** 11 * Remove the border on images inside links in IE 10-. 12 */ 13 14img { 15 border-style: none; 16}
And here is the same sample when the browserslist is ie >= 10
:
1/** 2 * Remove the border on images inside links in IE 10-. 3 */ 4 5img { 6 border-style: none; 7}
Add PostCSS Normalize to your project:
1npm install postcss-normalize --save-dev
Add a browserslist entry in package.json
:
1{ 2 "browserslist": "last 2 versions" 3}
Use PostCSS Normalize to process your CSS:
1const postcssNormalize = require('postcss-normalize') 2 3postcssNormalize.process(YOUR_CSS /*, processOptions, pluginOptions */)
Or use it as a PostCSS plugin:
1const postcss = require('postcss') 2const postcssNormalize = require('postcss-normalize') 3 4postcss([ 5 postcssNormalize(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */)
PostCSS Normalize runs in all Node environments, with special instructions for:
Node | PostCSS CLI | Webpack | Create React App | Gulp | Grunt |
---|
PostCSS Normalize includes a postcssImport
function to configure
PostCSS Import and allow you to continue using the @import
syntax.
1const postcss = require('postcss') 2const postcssImport = require('postcss-import') 3const postcssNormalize = require('postcss-normalize') 4 5postcss([ 6 postcssImport( 7 postcssNormalize( 8 /* pluginOptions (for PostCSS Normalize) */ 9 ).postcssImport( 10 /* pluginOptions (for PostCSS Import) */ 11 ) 12 ) 13]) // now you can use @import "normalize.css", etc. again
Alternatively, use @import-normalize
or @import-sanitize
to avoid conflicts
with @import
transforms.
1@import-normalize;
1@import-normalize "normalize/opinionated.css";
1@import-sanitize;
The allowDuplicates
option determines whether multiple, duplicate insertions
of CSS libraries are allowed. By default, duplicate libraries are omitted.
1postcssNormalize({ allowDuplicates: true })
The forceImport
option defines CSS libraries that will be inserted at the
beginning of the CSS file. Unless overriden by allowDuplicates
, duplicate
CSS libraries would still be omitted.
1postcssNormalize({ forceImport: true })
Specific CSS libraries may be defined.
1postcssNormalize({
2 forceImport: 'sanitize.css'
3})
The browsers
option defines an override of the project’s browserslist for
PostCSS Normalize. This option should be avoided in leui of a browserslist
file.
1postcssNormalize({ browsers: 'last 2 versions' })
PostCSS Normalize can include normalize.css or sanitize.css and configure either with the following combinations:
1@import "normalize"; /* also, @import "normalize.css" */ 2@import "normalize/opinionated"; /* also, @import "normalize.css/opinionated.css", @import "normalize.css/*" */ 3@import "sanitize"; /* also, @import "sanitize.css" */ 4@import "sanitize/assets"; /* also, @import "sanitize.css/assets.css" */ 5@import "sanitize/forms"; /* also, @import "sanitize.css/forms.css" */ 6@import "sanitize/reduce-motion"; /* also, @import "sanitize.css/reduce-motion.css" */ 7@import "sanitize/system-ui"; /* also, @import "sanitize.css/system-ui.css" */ 8@import "sanitize/typography"; /* also, @import "sanitize.css/typography.css" */ 9@import "sanitize/ui-monospace"; /* also, @import "sanitize.css/ui-monospace.css" */ 10@import "sanitize/*"; /* also, @import "sanitize.css/*" (sanitize + all additions) */
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/29 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
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