From f06956efd2dc4bf77244a9fcce2b883a00b925af Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 21 Dec 2023 22:46:53 +0800 Subject: updated node modules --- node_modules/postcss-minify-selectors/src/index.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'node_modules/postcss-minify-selectors/src/index.js') 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)); } -- cgit v1.2.3