-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Labels
Description
The current definition of in scope requires an element to be an inclusive descendant of the scoping root. This means an element must be in the same tree as the scoping root to be "in scope":
@scope (#somehost) {
:scope::part(p) { } /* Can never match */
}
However, browsers don't match the spec at the moment: https://wpt.fyi/results/css/css-cascade/scope-part.html?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2025-scope
We don't behave consistently for all tree-crossing stuff; ::slotted() cases aren't working, at least not in Chrome and Firefox.
The question is, should we change WPTs/browers, or should we change the definition of what "in scope" means in the spec? cc @dshin-moz, @mdubet