Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

postcss-discard-duplicates

Package Overview
Dependencies
0
Maintainers
8
Versions
44
Issues
File Explorer

Advanced tools

postcss-discard-duplicates

Discard duplicate rules in your CSS files with PostCSS.

    5.1.0latest

Version published
Maintainers
8
Weekly downloads
10,317,362
decreased by-9.86%

Weekly downloads

Readme

Source

postcss-discard-duplicates

Discard duplicate rules in your CSS files with PostCSS.

Install

With npm do:

npm install postcss-discard-duplicates --save

Example

This module will remove all duplicate rules from your stylesheets. It works on at rules, normal rules and declarations. Note that this module does not have any responsibility for normalising declarations, selectors or whitespace, so that it considers these two rules to be different:

h1, h2 { color: blue; } h2, h1 { color: blue; }

It has to assume that your rules have already been transformed by another processor, otherwise it would be responsible for too many things.

Input

h1 { margin: 0 auto; margin: 0 auto } h1 { margin: 0 auto }

Output

h1 { margin: 0 auto }

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

Keywords

FAQs

What is postcss-discard-duplicates?

Discard duplicate rules in your CSS files with PostCSS.

Is postcss-discard-duplicates popular?

The npm package postcss-discard-duplicates receives a total of 9,762,617 weekly downloads. As such, postcss-discard-duplicates popularity was classified as popular.

Is postcss-discard-duplicates well maintained?

We found that postcss-discard-duplicates demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 8 open source maintainers collaborating on the project.

Last updated on 01 Mar 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc