postcss-discard-duplicates
Discard duplicate rules in your CSS files with PostCSS.
Last updated 4 years ago by cssnano-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install postcss-discard-duplicates 
SYNC missed versions from official npm registry.

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

Current Tags

  • 7.0.1                                ...           latest (3 months ago)
  • 5.0.0-rc.2                                ...           next (4 years ago)
  • 4.0.0-nightly.2020.2.6                                ...           nightly (4 years ago)

50 Versions

  • 7.0.1                                ...           3 months ago
  • 7.0.0                                ...           7 months ago
  • 6.0.3                                ...           8 months ago
  • 6.0.2                                ...           9 months ago
  • 6.0.1                                ...           a year ago
  • 6.0.0                                ...           2 years ago
  • 5.1.0                                ...           3 years ago
  • 5.0.3                                ...           3 years ago
  • 5.0.2                                ...           3 years ago
  • 5.0.1                                ...           3 years ago
  • 5.0.0                                ...           4 years ago
  • 5.0.0-rc.2                                ...           4 years ago
  • 5.0.0-rc.1                                ...           4 years ago
  • 5.0.0-rc.0                                ...           4 years ago
  • 4.0.0-nightly.2020.2.6                                ...           4 years ago
  • 4.0.0-nightly.2020.1.11                                ...           4 years ago
  • 4.0.0-nightly.2020.1.9                                ...           4 years ago
  • 4.0.0-nightly.2020.10.20                                ...           4 years ago
  • 4.0.0-nightly.2020.9.9                                ...           4 years ago
  • 4.0.0-nightly.2020.9.3                                ...           4 years ago
  • 4.0.0-nightly.2020.9.1                                ...           4 years ago
  • 4.0.0-nightly.2020.8.29                                ...           4 years ago
  • 4.0.0-nightly.2020.8.25                                ...           4 years ago
  • 4.0.0-nightly.2020.8.24                                ...           4 years ago
  • 4.0.0-nightly.2020.8.17                                ...           4 years ago
  • 4.0.0-nightly.2020.8.10                                ...           4 years ago
  • 4.0.0-nightly.2020.8.4                                ...           4 years ago
  • 4.0.0-nightly.2020.8.1                                ...           4 years ago
  • 4.0.0-nightly.2020.7.31                                ...           4 years ago
  • 4.0.0-nightly.2020.7.25                                ...           4 years ago
  • 4.0.0-nightly.2020.7.24                                ...           4 years ago
  • 4.0.2                                ...           6 years ago
  • 4.0.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 4.0.0-rc.2                                ...           7 years ago
  • 4.0.0-rc.0                                ...           7 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.2                                ...           8 years ago
  • 2.0.1                                ...           9 years ago
  • 2.0.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.6                                ...           9 years ago
  • 1.1.5                                ...           9 years ago
  • 1.1.4                                ...           9 years ago
  • 1.1.3                                ...           9 years ago
  • 1.1.2                                ...           10 years ago
  • 1.1.1                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE