summaryrefslogtreecommitdiff
path: root/node_modules/postcss-minify-selectors
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss-minify-selectors')
-rw-r--r--node_modules/postcss-minify-selectors/package.json6
-rw-r--r--node_modules/postcss-minify-selectors/src/index.js7
-rw-r--r--node_modules/postcss-minify-selectors/types/index.d.ts2
3 files changed, 11 insertions, 4 deletions
diff --git a/node_modules/postcss-minify-selectors/package.json b/node_modules/postcss-minify-selectors/package.json
index 395ec43e..403761c9 100644
--- a/node_modules/postcss-minify-selectors/package.json
+++ b/node_modules/postcss-minify-selectors/package.json
@@ -1,6 +1,6 @@
{
"name": "postcss-minify-selectors",
- "version": "6.0.0",
+ "version": "6.0.1",
"description": "Minify selectors with PostCSS.",
"main": "src/index.js",
"types": "types/index.d.ts",
@@ -35,9 +35,9 @@
"node": "^14 || ^16 || >=18.0"
},
"devDependencies": {
- "postcss": "^8.2.15"
+ "postcss": "^8.4.32"
},
"peerDependencies": {
- "postcss": "^8.2.15"
+ "postcss": "^8.4.31"
}
} \ No newline at end of file
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));
}
diff --git a/node_modules/postcss-minify-selectors/types/index.d.ts b/node_modules/postcss-minify-selectors/types/index.d.ts
index d2beadb6..4443a311 100644
--- a/node_modules/postcss-minify-selectors/types/index.d.ts
+++ b/node_modules/postcss-minify-selectors/types/index.d.ts
@@ -5,5 +5,5 @@ export = pluginCreator;
*/
declare function pluginCreator(): import('postcss').Plugin;
declare namespace pluginCreator {
- const postcss: true;
+ let postcss: true;
}