diff options
Diffstat (limited to 'node_modules/postcss-minify-selectors/src')
| -rw-r--r-- | node_modules/postcss-minify-selectors/src/index.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/node_modules/postcss-minify-selectors/src/index.js b/node_modules/postcss-minify-selectors/src/index.js index 9276ff2b..68950172 100644 --- a/node_modules/postcss-minify-selectors/src/index.js +++ b/node_modules/postcss-minify-selectors/src/index.js @@ -163,6 +163,13 @@ const tagReplacements = new Map([ function tag(selector) { const value = selector.value.toLowerCase(); + 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)) { selector.value = /** @type {string} */ (tagReplacements.get(value)); } |
