@@ -132,7 +132,22 @@ describe('SFC scoped CSS', () => {
132132 . toMatchInlineSnapshot ( `
133133 ".foo[data-v-test-s] { color: red;
134134 }"
135- ` )
135+ ` )
136+ expect ( compileScoped ( `:slotted(.foo) .bar { color: red; }` ) )
137+ . toMatchInlineSnapshot ( `
138+ ".foo[data-v-test-s] .bar { color: red;
139+ }"
140+ ` )
141+ expect ( compileScoped ( `::v-slotted(.foo,.baz .bar) { color: red; }` ) )
142+ . toMatchInlineSnapshot ( `
143+ ".foo[data-v-test-s],.baz .bar[data-v-test-s] { color: red;
144+ }"
145+ ` )
146+ expect ( compileScoped ( `::v-slotted(.foo,.baz) { color: red; }` ) )
147+ . toMatchInlineSnapshot ( `
148+ ".foo[data-v-test-s],.baz[data-v-test-s] { color: red;
149+ }"
150+ ` )
136151 expect ( compileScoped ( `::v-slotted(.foo) { color: red; }` ) )
137152 . toMatchInlineSnapshot ( `
138153 ".foo[data-v-test-s] { color: red;
@@ -148,6 +163,16 @@ describe('SFC scoped CSS', () => {
148163 ".baz .qux .foo .bar[data-v-test-s] { color: red;
149164 }"
150165 ` )
166+ expect ( compileScoped ( `.baz .qux ::v-slotted(.foo,.bar) { color: red; }` ) )
167+ . toMatchInlineSnapshot ( `
168+ ".baz .qux .foo[data-v-test-s],.baz .qux .bar[data-v-test-s] { color: red;
169+ }"
170+ ` )
171+ expect ( compileScoped ( `.baz .qux ::v-slotted(.foo,.bar) .m { color: red; }` ) )
172+ . toMatchInlineSnapshot ( `
173+ ".baz .qux .foo[data-v-test-s] .m,.baz .qux .bar[data-v-test-s] .m { color: red;
174+ }"
175+ ` )
151176 } )
152177
153178 test ( '::v-global' , ( ) => {
@@ -156,6 +181,11 @@ describe('SFC scoped CSS', () => {
156181 ".foo { color: red;
157182 }"
158183 ` )
184+ expect ( compileScoped ( `::v-global(.foo,.bar) { color: red; }` ) )
185+ . toMatchInlineSnapshot ( `
186+ ".foo,.bar { color: red;
187+ }"
188+ ` )
159189 expect ( compileScoped ( `::v-global(.foo) { color: red; }` ) )
160190 . toMatchInlineSnapshot ( `
161191 ".foo { color: red;
@@ -172,6 +202,24 @@ describe('SFC scoped CSS', () => {
172202 ".foo .bar { color: red;
173203 }"
174204 ` )
205+ expect (
206+ compileScoped ( `.baz .qux ::v-global(.foo .bar, .bar) { color: red; }` )
207+ ) . toMatchInlineSnapshot ( `
208+ ".foo .bar, .bar { color: red;
209+ }"
210+ ` )
211+ // global ignores anything after it
212+ expect ( compileScoped ( `::v-global(.foo .bar) .baz { color: red; }` ) )
213+ . toMatchInlineSnapshot ( `
214+ ".foo .bar { color: red;
215+ }"
216+ ` )
217+ expect (
218+ compileScoped ( `.baz ::v-global(.foo .bar,.faa) .qux { color: red; }` )
219+ ) . toMatchInlineSnapshot ( `
220+ ".foo .bar,.faa { color: red;
221+ }"
222+ ` )
175223 } )
176224
177225 test ( 'media query' , ( ) => {
0 commit comments