Skip to content

Commit a16c8bf

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Make container-name not tree-scoped behind a flag
Per spec resolution: w3c/csswg-drafts#12090 (comment) Not changing container-for-shadow-dom.html in this CL because there is an upstream PR in progress: #54612 Bug: 440049800 Change-Id: I8b463d798b6132b0bf8932b8152682959907af26 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6909530 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Rune Lillesveen <[email protected]> Cr-Commit-Position: refs/heads/main@{#1510774}
1 parent 6a81178 commit a16c8bf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

css/css-conditional/container-queries/container-name-tree-scoped.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!doctype html>
22
<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>
44
<link rel="help" href="https://drafts.csswg.org/css-conditional-5/#query-container">
55
<link rel="help" href="https://drafts.csswg.org/css-scoping-1/#shadow-names">
66
<script src="/resources/testharness.js"></script>
@@ -21,9 +21,9 @@
2121
#container-name-host > div {
2222
container-type: inline-size;
2323
}
24-
#t1 { color: green; }
24+
#t1 { color: red; }
2525
@container foo (width > 0px) {
26-
#t1 { color: red; }
26+
#t1 { color: green; }
2727
}
2828
</style>
2929
</div>
@@ -46,9 +46,9 @@
4646
#container-name-slotted > div > div {
4747
container-type: inline-size;
4848
}
49-
#t2 { color: green; }
49+
#t2 { color: red; }
5050
@container foo (width > 0px) {
51-
#t2 { color: red; }
51+
#t2 { color: green; }
5252
}
5353
</style>
5454

@@ -95,11 +95,11 @@
9595

9696
test(() => {
9797
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");
9999

100100
test(() => {
101101
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");
103103

104104
test(() => {
105105
assert_equals(getComputedStyle(t3host.shadowRoot.querySelector('#t3')).color, green);

css/css-mixins/function-shadow-container.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</template>
2929
</div>
3030

31-
<div data-name="::part() can not see inner named containers">
31+
<div data-name="::part() can see inner named containers">
3232
<template shadowrootmode=open>
3333
<style>
3434
@function --b() {
@@ -41,7 +41,7 @@
4141
}
4242
::part(target) {
4343
--actual: --b();
44-
--expected: 10px;
44+
--expected: 5px;
4545
}
4646
.container {
4747
container: --cont / size;
@@ -104,7 +104,7 @@
104104
}
105105
::slotted(#target) {
106106
--actual: --b() --c();
107-
--expected: 10px 5px;
107+
--expected: 5px 5px;
108108
}
109109
</style>
110110
<div class=container>

0 commit comments

Comments
 (0)