Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-normalize-url

Package Overview
Dependencies
Maintainers
5
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-normalize-url

Normalize URLs with PostCSS

  • 4.0.0-nightly.2020.8.25
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is postcss-normalize-url?

The postcss-normalize-url npm package is a PostCSS plugin designed to normalize URLs within your CSS. This includes operations such as normalization of quotation marks, removal of default ports, and encoding of special characters in URLs. It helps in reducing the size of your CSS by ensuring URLs are optimized and consistent.

What are postcss-normalize-url's main functionalities?

Normalization of URLs

This feature normalizes URLs by removing the default port (80 for http and 443 for https) and ensures the URL is encoded properly. It also normalizes quotation marks around URLs.

postcss([ require('postcss-normalize-url')() ]).process('a { background-url: url(http://example.com:80/image.png); }').then(result => { console.log(result.css); });

Removal of unnecessary quotes

This feature removes unnecessary quotes around URLs when they are not required, which can help in reducing the size of the CSS file.

postcss([ require('postcss-normalize-url')() ]).process('a { background-url: url("http://example.com/image.png"); }').then(result => { console.log(result.css); });

Encoding of special characters in URLs

This feature ensures that special characters in URLs are properly encoded, making the URL safe to use across different browsers and environments.

postcss([ require('postcss-normalize-url')() ]).process('a { background-url: url(http://example.com/ü.png); }').then(result => { console.log(result.css); });

Other packages similar to postcss-normalize-url

Keywords

FAQs

Package last updated on 25 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc