Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

postcss-merge-rules

Package Overview
Dependencies
17
Maintainers
8
Versions
68
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

postcss-merge-rules

Merge CSS rules with PostCSS.

    6.0.1latest
    GitHub
    npm

Version published
Maintainers
8
Weekly downloads
10,678,600
decreased by-2.37%

Weekly downloads

Readme

Source

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

Keywords

FAQs

Last updated on 30 Apr 2023

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
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc