postcss-minify-selectors
Advanced tools
Comparing version
{ | ||
"name": "postcss-minify-selectors", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Minify selectors with PostCSS.", | ||
@@ -38,7 +38,7 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"postcss": "^8.2.15" | ||
"postcss": "^8.4.32" | ||
}, | ||
"peerDependencies": { | ||
"postcss": "^8.2.15" | ||
"postcss": "^8.4.31" | ||
} | ||
} |
@@ -166,2 +166,9 @@ 'use strict'; | ||
const isSimple = selector.parent && selector.parent.nodes.length === 1; | ||
// Avoid simplifying complex selectors (`entry 100% {...}`) | ||
if (!isSimple) { | ||
return; | ||
} | ||
// Simplify simple selectors that have replacements (`100% {...}`) | ||
if (tagReplacements.has(value)) { | ||
@@ -168,0 +175,0 @@ selector.value = /** @type {string} */ (tagReplacements.get(value)); |
@@ -8,3 +8,3 @@ export = pluginCreator; | ||
declare namespace pluginCreator { | ||
const postcss: true; | ||
let postcss: true; | ||
} |
9749
2.51%258
2.38%