postcss-merge-rules
TypeScript icon, indicating that this package has built-in type declarations

4.0.0-nightly.2020.2.6 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.0.5375,657latest
5.0.0-rc.2210next
4.0.0-nightly.2020.2.622nightly

Version History

VersionDownloads (Last 7 Days)Published
7.0.5375,657
7.0.41,254,505
7.0.329,798
7.0.2117,598
7.0.17,407
7.0.055,765
6.1.11,776,507
6.1.021,625
6.0.418,749
6.0.3113,712
6.0.223,759
6.0.1288,428
6.0.012,052
5.1.43,909,867
5.1.3455,404
5.1.2538,857
5.1.1136,404
5.1.033,587
5.0.628,188
5.0.540,597
5.0.447,767
5.0.364,258
5.0.2148,395
5.0.14,690
5.0.014,147
5.0.0-rc.2210
5.0.0-rc.13
5.0.0-rc.02
4.0.0-nightly.2020.2.622
4.0.0-nightly.2020.1.110
4.0.0-nightly.2020.1.90
4.0.0-nightly.2020.10.201
4.0.0-nightly.2020.9.9126
4.0.0-nightly.2020.9.32
4.0.0-nightly.2020.9.11
4.0.0-nightly.2020.8.291
4.0.0-nightly.2020.8.251
4.0.0-nightly.2020.8.241
4.0.0-nightly.2020.8.170
4.0.0-nightly.2020.8.101
4.0.0-nightly.2020.8.41
4.0.0-nightly.2020.8.11
4.0.0-nightly.2020.7.310
4.0.0-nightly.2020.7.250
4.0.0-nightly.2020.7.241
4.0.32,210,814
4.0.222,734
4.0.11,892
4.0.058
4.0.0-rc.224
4.0.0-rc.00
2.1.2380,017
2.1.11,425
2.1.01
2.0.11302
2.0.10487
2.0.94
2.0.82
2.0.76
2.0.68
2.0.55
2.0.40
2.0.37
2.0.225
2.0.12
2.0.02
1.3.64,213
1.3.50
1.3.40
1.3.31
1.3.20
1.3.12
1.3.00
1.2.20
1.2.10
1.2.00
1.1.10
1.1.00
1.0.00

Package Sidebar

Install

npm i postcss-merge-rules@4.0.0-nightly.2020.2.6

Version

4.0.0-nightly.2020.2.6

License

MIT

Unpacked Size

18.9 kB

Total Files

5

Last publish

Collaborators

  • beneb
  • trysound
  • ludovicofischer
  • ai
  • chriseppstein
  • andyjansson
  • evilebottnawi
  • cssnano-bot