[wpt-sync] Sync PR 40722 - [@scope] Support @scope nested within style rules
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 40722 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/40722
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
[@scope] Support @scope nested within style rules
This CL adds support for nesting @scope inside regular style rules, e.g.
.a {
@scope (& .b) {
& { ... }
}
}Note that @scope is a little different from other nested group rules
(like @media), because @scope itself acts as the parent style rule
for the purposes of evaluating the parent pseudo-class (&) inside the
body [1].This means the '&' in the @scope's prelude refers to the '.a' selector,
but the '&' in @scope's body refers to the selector in the prelude,
which effectively is '.a .b'.[1] https://drafts.csswg.org/css-nesting/#nesting-at-scope
Bug: 1456435
Change-Id: I6f53566d9e9bde50a888ab3b86dfd6699f004ebd
Reviewed-on: https://chromium-review.googlesource.com/4637290
WPT-Export-Revision: 525d492e4a48119f9ddba7067382c34068192353
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a5540d8b4575
https://hg.mozilla.org/mozilla-central/rev/512432d04d46
Description
•