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

index af8c874c5f55368c355f82f580a34127534811bd,78fd52425e8ffe7dfa30658c57f9d9e3aac9c689..40e158f0c7834dbb0f30ca61e668afff4e4421b1
@@@ -239,34 -242,11 +242,35 @@@ color: re
          `.div { color: red; } .div:is(.foo:hover) { color: blue; }`,
        ),
      ).toMatchInlineSnapshot(`
-     ".div[data-v-test] { color: red;
-     }
-     .div[data-v-test]:is(.foo:hover) { color: blue;
-     }"`)
+       ".div[data-v-test] { color: red;
+       }
+       .div[data-v-test]:is(.foo:hover) { color: blue;
+       }"
+     `)
++    
 +    expect(compileScoped(`#app :is(.foo) { color: red; }`))
 +      .toMatchInlineSnapshot(`
 +      "#app :is(.foo[data-v-test]) { color: red;
 +      }"
 +    `)
 +
 +    expect(compileScoped(`#app :is(:is(.foo)) { color: red; }`))
 +      .toMatchInlineSnapshot(`
 +        "#app :is(:is(.foo[data-v-test])) { color: red;
 +        }"
 +      `)
 +
 +    expect(compileScoped(`#app :where(.foo) { color: red; }`))
 +      .toMatchInlineSnapshot(`
 +      "#app :where(.foo[data-v-test]) { color: red;
 +      }"
 +    `)
 +
 +    expect(compileScoped(`#app :where(:where(.foo)) { color: red; }`))
 +      .toMatchInlineSnapshot(`
 +        "#app :where(:where(.foo[data-v-test])) { color: red;
 +        }"
 +      `)
    })
  
    test('media query', () => {