Socket
Socket
Sign inDemoInstall

postcss-normalize-whitespace

Package Overview
Dependencies
5
Maintainers
7
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-normalize-whitespace

Trim whitespace inside and around CSS rules & declarations.


Version published
Maintainers
7
Weekly downloads
9,663,864
decreased by-1.28%
Bundle size
2.2 kB
Minified + gzipped

Weekly downloads

Package description

What is postcss-normalize-whitespace?

The postcss-normalize-whitespace npm package is a PostCSS plugin designed to normalize and minimize the whitespace in your CSS. It helps in reducing the file size and improving the readability of the CSS by consistently formatting the whitespace.

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

Minifying CSS

This feature allows you to compress your CSS by removing unnecessary whitespace, which can include spaces, tabs, and newlines that are not required for the CSS to function properly.

const postcss = require('postcss');
const normalizeWhitespace = require('postcss-normalize-whitespace');

postcss([normalizeWhitespace]).process('h1 {  color: red; }').then(result => {
  console.log(result.css); // Output: 'h1{color:red}'
});

Other packages similar to postcss-normalize-whitespace

Readme

Source

postcss-normalize-whitespace

Normalize whitespace with PostCSS.

Install

With npm do:

npm install postcss-normalize-whitespace --save

Example

Input

h1{
    width: calc(10px - ( 100px / var(--test) )) 
}

Output

h1{
    width: calc(10px - 100px / var(--test))
}

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

Keywords

FAQs

Last updated on 14 Dec 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc