[@scope] Implement scoped declarations
This CL allows declarations to appear directly within an @scope
rule, e.g.:
@scope (.foo) {
color: green;
}
Such declarations match the scoping root with zero specificity, i.e.
as if wrapped in a :where(:scope) rule.
Using declarations directly is already possible when @scope
is a "nested group rule" [1] (i.e. nested within a style rule).
This capability is now extended to non-nested @scope rules as well [2].
[1] https://drafts.csswg.org/css-nesting-1/#nested-group-rules
[2] https://drafts.csswg.org/css-cascade-6/#scoped-declarations
Fixed: 351045927
Change-Id: I40058437abdf976c472122076ee5eed754f93718
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020075
Commit-Queue: Anders Hartvoll Ruud andruud@chromium.org
Reviewed-by: Steinar H Gunderson sesse@chromium.org
Cr-Commit-Position: refs/heads/main@{#1384238}