postcss-merge-rules
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,6 @@ | ||
# 1.2.1 | ||
* Fixed a bug where media queries were being merged when their parameters were | ||
different. | ||
# 1.2.0 | ||
@@ -12,3 +17,3 @@ | ||
* Less eager moving of properties, to avoid cases where moving a longhand | ||
property would allow a shorthand property to override it. | ||
property would allow a shorthand property to override it. | ||
@@ -15,0 +20,0 @@ # 1.0.0 |
@@ -44,3 +44,8 @@ 'use strict'; | ||
var hasParent = ruleA.parent && ruleB.parent; | ||
return hasParent ? ruleA.parent.type === ruleB.parent.type : true; | ||
var sameType = hasParent && ruleA.parent.type === ruleB.parent.type; | ||
// If an at rule, ensure that the parameters are the same | ||
if (ruleA.parent.type !== 'root' && ruleB.parent.type !== 'root') { | ||
sameType = sameType && ruleA.parent.params === ruleB.parent.params; | ||
} | ||
return hasParent ? sameType : true; | ||
} | ||
@@ -47,0 +52,0 @@ |
{ | ||
"name": "postcss-merge-rules", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Merge CSS rules with PostCSS.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8958
131