File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 91
91
// Insert inner <a> with JS, since the parser can't produce this result.
92
92
let inner_a = document . createElement ( 'a' ) ;
93
93
inner_a . setAttribute ( 'href' , '' ) ;
94
+ inner_a . setAttribute ( 'class' , 'with_class_inner' ) ;
95
+ inner_a . setAttribute ( 'style' , 'color: green' ) ;
94
96
inner_a . textContent = 'Visited2' ;
95
97
outer_visited . append ( inner_a ) ;
96
98
</ script >
Original file line number Diff line number Diff line change 186
186
< template shadowrootmode =open >
187
187
< main >
188
188
Main
189
- < a href ="">
189
+ < a href ="" class =" with_class_outer " >
190
190
Visited1
191
191
</ a >
192
192
</ main >
198
198
@scope (: vis ited) {
199
199
: scope > : visited { background-color : coral; }
200
200
}
201
+ @scope (: vis ited) {
202
+ : visited > : scope { background-color : lightgrey; }
203
+ }
204
+ @scope (.with_class_inner ) {
205
+ : visited > : scope { color : yellow; }
206
+ }
207
+
208
+ /* Should match */
209
+ @scope (.with_class_outer ) {
210
+ : scope > : visited { color : green; }
211
+ }
201
212
</ style >
202
213
</ template >
203
214
</ div >
207
218
// Insert the inner :visited link with JS, since the parser
208
219
// can't produce this.
209
220
let outer_a = visited_in_visited . shadowRoot . querySelector ( 'main > a' ) ;
221
+
210
222
let inner_a = document . createElement ( 'a' ) ;
211
223
inner_a . setAttribute ( 'href' , '' ) ;
224
+ inner_a . setAttribute ( 'class' , 'with_class_inner' ) ;
212
225
inner_a . textContent = 'Visited2' ;
213
226
outer_a . append ( inner_a ) ;
214
227
}
You can’t perform that action at this time.
0 commit comments