]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
Merge branch 'main' into edison/fix/12241
authoredison <daiwei521@126.com>
Sat, 24 May 2025 13:14:48 +0000 (21:14 +0800)
committerGitHub <noreply@github.com>
Sat, 24 May 2025 13:14:48 +0000 (21:14 +0800)
1  2 
packages/compiler-sfc/__tests__/compileStyle.spec.ts
packages/compiler-sfc/src/style/pluginScoped.ts

index 57f6a580afc96d5081a3d4e87d8c15e536ffa9fb,4845d8eee39568b6e91aa49ece544740635ff7fe..71758861eb479f7a504f0b23a82045ea9a2829f2
@@@ -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
      }
    })