:lang pseudo selector doesn't propagate across shadow boundaries.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: gullerya, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
I've created custom element with open shadow DOM.
I've added inside that shadow DOM the following CSS rule:
.dollar:lang(en)::before {
content: "$ ";
}
I've added do the shadow DOM element with some number and .dollar class.
I've set on the main HTML document the attribute "lang=en".
Actual results:
'$ ' textual content as defined in the pseudo element NOT appeared.
Looking into the Dev tools show that the rule was not matched.
Expected results:
I'd expect that that lang value of the main HTML document propagate into the shadow DOM and the element within the shadow DOM would match the selector (showing the content of '$ ').
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Given the general agreement on making :dir
cross shadow tree boundaries, it seems reasonable to me to make :lang
work on the flat tree.
I'm on PTO until Friday, but I'll take a look afterwards.
Comment 3•5 years ago
|
||
This is consistent with :dir(), though maybe we should wait for
https://github.com/whatwg/html/issues/4906 to reach some consensus before
landing this.
Comment 4•5 years ago
|
||
I proposed a patch, but behavior seems all over the place right now, see https://github.com/whatwg/html/issues/4906.
Comment 5•2 years ago
|
||
The following patch is waiting for review from an inactive reviewer:
ID | Title | Author | Reviewer Status |
---|---|---|---|
D45638 | Bug 1579075 - Make :lang() work through the flat tree. | emilio | smaug: Resigned from review |
:emilio, could you please find another reviewer or abandon the patch if it is no longer relevant?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•