[Webkit-unassigned] [Bug 210249] New: [CSS Shadow Parts] ::part() selector selects wrong elements when parts are not top-level children of a shadow root
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 8 23:24:22 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=210249
Bug ID: 210249
Summary: [CSS Shadow Parts] ::part() selector selects wrong
elements when parts are not top-level children of a
shadow root
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Major
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: justinfagnani at google.com
The ::part() selector released in 13.1, and as currently implemented in TP and nightly, is selecting the wrong elements when parts are nested in any container element in a shadow root.
Given this DOM:
<!-- This div is necessary to trigger the bug -->
<div>
<span part="one">Should be Blue</span> |
<span part="two">Should be Red</span>
</div>
And these selectors:
my-element::part(one) {
color: blue;
}
my-element::part(two) {
color: red;
}
The text spans should be blue then red as described. Instead they are both blue.
If the <div> is removed, or if the second <span> is changed to a different tag, the colors are correct.
JS Bin: https://jsbin.com/bucejul/3/edit
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200409/7fc5abf4/attachment.htm>
More information about the webkit-unassigned
mailing list