Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

postcss-merge-rules

Package Overview
Dependencies
4
Maintainers
8
Versions
65
Issues
File Explorer

Advanced tools

postcss-merge-rules

Merge CSS rules with PostCSS.

    5.1.3latest

Version published
Maintainers
8
Weekly downloads
8,781,261
decreased by-21.47%

Weekly downloads

Changelog

Source

v5.1.3

Bug Fixes

  • fix: do not merge declarations containing custom properties when it might create invalid declarations (2c699341)

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

What is postcss-merge-rules?

Merge CSS rules with PostCSS.

Is postcss-merge-rules popular?

The npm package postcss-merge-rules receives a total of 7,316,962 weekly downloads. As such, postcss-merge-rules popularity was classified as popular.

Is postcss-merge-rules well maintained?

We found that postcss-merge-rules demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 8 open source maintainers collaborating on the project.

Last updated on 28 Oct 2022

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 Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc