[css-cascade-6] Can we replace the selector scoping notation with a new parameter in querySelector()
? · Issue #7709 · w3c/csswg-drafts (original) (raw)
CSS Cascade L6 defines a selector scoping notation which is functionally the same as the @scope
rules, but is designed as a selector syntax rather than an at-rule. There is also an inline issue, noting the purpose of that:
This notation was added in order to allow scoping limits to be applied within
querySelector()
. Is this something we want to have?
In practice, the selector notation is much more difficult to design in a readable way. The basic syntax is less clear than the at-rule, we haven't yet determined how it interacts with nesting, and it's become a blocker for otherwise-straight-forward issues like #6577. If we don't absolutely need this syntax, and can find another solution for scoping querySelector()
, I would like to remove it from the spec.
My proposal would be:
- Add a second
lowerBoundary
parameter to bothquerySelector()
andquerySelectorAll()
. - Remove the 'selector scoping notation' from Cascade 6