File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
css-conditional/container-queries Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
2
< meta charset ="utf-8 ">
3
- < title > CSS Container Queries Test: Tree scoped container-name </ title >
3
+ < title > CSS Container Queries Test: Container names are not tree-scoped </ title >
4
4
< link rel ="help " href ="https://drafts.csswg.org/css-conditional-5/#query-container ">
5
5
< link rel ="help " href ="https://drafts.csswg.org/css-scoping-1/#shadow-names ">
6
6
< script src ="/resources/testharness.js "> </ script >
21
21
# container-name-host > div {
22
22
container-type : inline-size;
23
23
}
24
- # t1 { color : green ; }
24
+ # t1 { color : red ; }
25
25
@container foo (width > 0px) {
26
- # t1 { color : red ; }
26
+ # t1 { color : green ; }
27
27
}
28
28
</ style >
29
29
</ div >
46
46
# container-name-slotted > div > div {
47
47
container-type : inline-size;
48
48
}
49
- # t2 { color : green ; }
49
+ # t2 { color : red ; }
50
50
@container foo (width > 0px) {
51
- # t2 { color : red ; }
51
+ # t2 { color : green ; }
52
52
}
53
53
</ style >
54
54
95
95
96
96
test ( ( ) => {
97
97
assert_equals ( getComputedStyle ( t1 ) . color , green ) ;
98
- } , "Outer scope query should not match container-name set by :host rule in shadow tree" ) ;
98
+ } , "Outer scope query should match container-name set by :host rule in shadow tree" ) ;
99
99
100
100
test ( ( ) => {
101
101
assert_equals ( getComputedStyle ( t2 ) . color , green ) ;
102
- } , "Outer scope query should not match container-name set by ::slotted rule in shadow tree" ) ;
102
+ } , "Outer scope query should match container-name set by ::slotted rule in shadow tree" ) ;
103
103
104
104
test ( ( ) => {
105
105
assert_equals ( getComputedStyle ( t3host . shadowRoot . querySelector ( '#t3' ) ) . color , green ) ;
Original file line number Diff line number Diff line change 28
28
</ template >
29
29
</ div >
30
30
31
- < div data-name ="::part() can not see inner named containers ">
31
+ < div data-name ="::part() can see inner named containers ">
32
32
< template shadowrootmode =open >
33
33
< style >
34
34
@function --b() {
41
41
}
42
42
::part (target ) {
43
43
--actual : --b ();
44
- --expected : 10 px ;
44
+ --expected : 5 px ;
45
45
}
46
46
.container {
47
47
container : --cont / size;
104
104
}
105
105
::slotted (# target ) {
106
106
--actual : --b () --c ();
107
- --expected : 10 px 5px ;
107
+ --expected : 5 px 5px ;
108
108
}
109
109
</ style >
110
110
< div class =container >
You can’t perform that action at this time.
0 commit comments