🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

postcss-merge-rules

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-merge-rules - npm Package Compare versions

Comparing version

to
1.3.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 1.3.1
* Fixes a behaviour in which rule adjacent forward nodes were not being type
checked before they were merged.
* Compatibility fixes for the PostCSS plugin guidelines.
# 1.3.0

@@ -2,0 +8,0 @@

2

index.js

@@ -76,3 +76,3 @@ 'use strict';

var nextRule = second.next();
if (nextRule) {
if (nextRule && nextRule.type !== 'comment') {
var nextIntersection = intersect(getDeclarations(second), getDeclarations(nextRule));

@@ -79,0 +79,0 @@ if (nextIntersection.length > intersection.length) {

{
"name": "postcss-merge-rules",
"version": "1.3.0",
"version": "1.3.1",
"description": "Merge CSS rules with PostCSS.",

@@ -14,10 +14,10 @@ "main": "index.js",

"postcss",
"postcss-plugins"
"postcss-plugin"
],
"license": "MIT",
"devDependencies": {
"jshint": "^2.6.3",
"jshint-stylish": "^1.0.1",
"tap-spec": "^2.2.2",
"tape": "^3.5.0"
"jshint": "^2.8.0",
"jshint-stylish": "^2.0.1",
"tap-spec": "^4.0.2",
"tape": "^4.0.0"
},

@@ -36,4 +36,4 @@ "homepage": "https://github.com/ben-eb/postcss-merge-rules",

"flatten": "0.0.1",
"postcss": "^4.1.2"
"postcss": "^4.1.16"
}
}

@@ -5,4 +5,6 @@ # [postcss][postcss]-merge-rules [![Build Status](https://travis-ci.org/ben-eb/postcss-merge-rules.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-merge-rules.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-merge-rules.svg)][deps]

Install via [npm](https://npmjs.org/package/postcss-merge-rules):
## Install
With [npm](https://npmjs.org/package/postcss-merge-rules) do:
```

@@ -12,14 +14,4 @@ npm install postcss-merge-rules --save

## Example
## Examples
```js
var postcss = require('postcss');
var mergeRules = require('postcss-merge-rules');
var css = 'a{color:blue}a{font-weight:bold}';
console.log(postcss(mergeRules()).process(css).css);
// => 'a{color:blue;font-weight:bold}'
```
This module will attempt to merge *adjacent* CSS rules:

@@ -29,2 +21,4 @@

#### Input
```css

@@ -42,3 +36,3 @@ a {

Becomes:
#### Output

@@ -54,2 +48,4 @@ ```css

#### Input
```css

@@ -65,3 +61,3 @@ a {

Becomes:
#### Output

@@ -77,2 +73,4 @@ ```css

#### Input
```css

@@ -89,3 +87,3 @@ a {

Becomes:
#### Output

@@ -102,2 +100,7 @@ ```css

## Usage
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
examples for your environment.
## Contributing

@@ -110,3 +113,3 @@

MIT © Ben Briggs
MIT © [Ben Briggs](http://beneb.info)

@@ -113,0 +116,0 @@ [ci]: https://travis-ci.org/ben-eb/postcss-merge-rules

Sorry, the diff of this file is not supported yet