postcss-discard-duplicates
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,6 @@ | ||
# 1.1.1 | ||
* Fixed a bug where keyframe rules were being incorrectly discarded, if they had | ||
the same declarations but different vendor prefixes. | ||
# 1.1.0 | ||
@@ -2,0 +7,0 @@ |
@@ -13,2 +13,7 @@ 'use strict'; | ||
var sameContext = node.parent.type === cache.parent.type; | ||
// Ensure that at rules have exactly the same name; this accounts for | ||
// vendor prefixes | ||
if (node.parent.type !== 'root') { | ||
sameContext = sameContext && node.parent.name === cache.parent.name; | ||
} | ||
return sameContext && getIdent(node) === getIdent(cache); | ||
@@ -34,3 +39,3 @@ }; | ||
css.eachRule(function (rule) { | ||
rule.eachInside(dedupe()); | ||
rule.eachDecl(dedupe()); | ||
}); | ||
@@ -37,0 +42,0 @@ css.eachRule(dedupe()); |
{ | ||
"name": "postcss-discard-duplicates", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Discard duplicate rules in your CSS files with PostCSS.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
5055
37