postcss-merge-rules
Merge CSS rules with PostCSS.
Last updated 4 years ago by ludovicofischer .
MIT · Repository · Bugs · Original npm
$ cnpm install postcss-merge-rules 
SYNC missed versions from official npm registry.

postcss-merge-rules

Merge CSS rules with PostCSS.

Install

With npm do:

npm install postcss-merge-rules --save

Examples

This module will attempt to merge adjacent CSS rules:

By declarations

Input

a {
    color: blue;
    font-weight: bold
}

p {
    color: blue;
    font-weight: bold
}

Output

a,p {
    color: blue;
    font-weight: bold
}

By selectors

Input

a {
    color: blue
}

a {
    font-weight: bold
}

Output

a {
    color: blue;
    font-weight: bold
}

By partial declarations

Input

a {
    font-weight: bold
}

p {
    color: blue;
    font-weight: bold
}

Output

a,p {
    font-weight: bold
}

p {
    color: blue
}

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

Current Tags

  • 6.0.0                                ...           latest (2 years ago)

13 Versions

  • 6.0.0                                ...           2 years ago
  • 5.1.4                                ...           3 years ago
  • 5.1.2                                ...           3 years ago
  • 5.1.1                                ...           3 years ago
  • 5.0.5                                ...           4 years ago
  • 5.0.4                                ...           4 years ago
  • 5.0.2                                ...           4 years ago
  • 4.0.0-nightly.2020.2.6                                ...           5 years ago
  • 5.0.0-rc.2                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 1.3.6                                ...           10 years ago
  • 2.1.2                                ...           9 years ago
  • 4.0.3                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org