postcss-normalize-url (5.1.0)

Published 2026-02-24 14:03:13 +00:00 by atheaadmin

Installation

registry=
npm install postcss-normalize-url@5.1.0
"postcss-normalize-url": "5.1.0"

About this package

postcss-normalize-url

Normalize URLs with PostCSS.

Install

With npm do:

npm install postcss-normalize-url --save

Example

Input

h1 {
    background: url("http://site.com:80/image.jpg")
}

Output

h1 {
    background: url(http://site.com/image.jpg)
}

Note that this module will also try to normalize relative URLs, and is capable of stripping unnecessary quotes. For more examples, see the tests.

Usage

See the PostCSS documentation for examples for your environment.

API

normalize([options])

Please see the normalize-url documentation. By default, normalizeProtocol, stripHash & stripWWW are set to false.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

Dependencies

Dependencies

ID Version
normalize-url ^6.0.1
postcss-value-parser ^4.2.0

Development Dependencies

ID Version
postcss ^8.2.15

Peer Dependencies

ID Version
postcss ^8.2.15

Keywords

css normalize optimise optimisation postcss postcss-plugin url
Details
npm
2026-02-24 14:03:13 +00:00
0
Ben Briggs
MIT
latest
3.2 KiB
Assets (1)
Versions (1) View all
5.1.0 2026-02-24