postcss-discard-duplicates
Discard duplicate rules in your CSS files with PostCSS.
Last updated 2 years ago by evilebottnawi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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

  • 4.0.2                                ...           latest (2 years ago)
  • 4.0.0-rc.2                                ...           next (3 years ago)
  • 4.0.0-nightly.2020.1.11                                ...           nightly (8 days ago)

35 Versions

  • 4.0.0-nightly.2020.1.11                                ...           8 days ago
  • 4.0.0-nightly.2020.1.9                                ...           10 days ago
  • 4.0.0-nightly.2020.10.20                                ...           3 months ago
  • 4.0.0-nightly.2020.9.9                                ...           4 months ago
  • 4.0.0-nightly.2020.9.3                                ...           5 months ago
  • 4.0.0-nightly.2020.9.1                                ...           5 months ago
  • 4.0.0-nightly.2020.8.29                                ...           5 months ago
  • 4.0.0-nightly.2020.8.25                                ...           5 months ago
  • 4.0.0-nightly.2020.8.24                                ...           5 months ago
  • 4.0.0-nightly.2020.8.17                                ...           5 months ago
  • 4.0.0-nightly.2020.8.10                                ...           5 months ago
  • 4.0.0-nightly.2020.8.4                                ...           6 months ago
  • 4.0.0-nightly.2020.8.1                                ...           6 months ago
  • 4.0.0-nightly.2020.7.31                                ...           6 months ago
  • 4.0.0-nightly.2020.7.25                                ...           6 months ago
  • 4.0.0-nightly.2020.7.24                                ...           6 months ago
  • 4.0.2                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           3 years ago
  • 4.0.0-rc.2                                ...           3 years ago
  • 4.0.0-rc.0                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.6                                ...           5 years ago
  • 1.1.5                                ...           5 years ago
  • 1.1.4                                ...           5 years ago
  • 1.1.3                                ...           6 years ago
  • 1.1.2                                ...           6 years ago
  • 1.1.1                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Downloads
Today 5,763
This Week 71,788
This Month 460,355
Last Day 33,826
Last Week 186,934
Last Month 876,471
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |