Skip to content

Commit 62f2aa1

Browse files
authored
test(compiler-sfc): direct descendant wildcard rule selector (#13411)
add test case for #13387
1 parent a60f2bd commit 62f2aa1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/compiler-sfc/__tests__/compileStyle.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,24 @@ describe('SFC scoped CSS', () => {
3939
expect(compileScoped(`h1 .foo { color: red; }`)).toMatch(
4040
`h1 .foo[data-v-test] { color: red;`,
4141
)
42+
43+
// #13387
44+
expect(
45+
compileScoped(`main {
46+
width: 100%;
47+
> * {
48+
max-width: 200px;
49+
}
50+
}`),
51+
).toMatchInlineSnapshot(`
52+
"main {
53+
&[data-v-test] {
54+
width: 100%;
55+
}
56+
> *[data-v-test] {
57+
max-width: 200px;
58+
}
59+
}"`)
4260
})
4361

4462
test('nesting selector', () => {

0 commit comments

Comments
 (0)