From: edison Date: Sat, 24 May 2025 13:14:48 +0000 (+0800) Subject: Merge branch 'main' into edison/fix/12241 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec7ff38d37b35f776ba29ebaa8c24c2f0c584c00;p=thirdparty%2Fvuejs%2Fcore.git Merge branch 'main' into edison/fix/12241 --- ec7ff38d37b35f776ba29ebaa8c24c2f0c584c00 diff --cc packages/compiler-sfc/src/style/pluginScoped.ts index 57f6a580af,4845d8eee3..71758861eb --- a/packages/compiler-sfc/src/style/pluginScoped.ts +++ b/packages/compiler-sfc/src/style/pluginScoped.ts @@@ -221,18 -223,15 +223,19 @@@ function rewriteSelector } if ( - (n.type !== 'pseudo' && n.type !== 'combinator') || - (n.type !== 'pseudo' && - n.type !== 'combinator' && - n.type !== 'universal') || - (n.type === 'pseudo' && - (n.value === ':is' || n.value === ':where') && - !node) ++ (n.type !== 'pseudo' && n.type !== 'combinator' && n.type !== 'universal') || + (isPseudoClassIsOrWhere(n) && + (!node || + n.nodes.some( + s => + // has nested :is or :where + s.nodes.some(x => isPseudoClassIsOrWhere(x)) || + // has non-pseudo selector + !s.nodes.some(x => x.type === 'pseudo'), + ))) ) { node = n + starNode = null } })