Bug 250379 - [css-nesting] Implement top-level nesting selector
Summary: [css-nesting] Implement top-level nesting selector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-10 05:48 PST by Matthieu Dubet
Modified: 2023-03-16 03:40 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Dubet 2023-01-10 05:48:10 PST
The css-nesting-1 spec allows nesting selector in top-level rules, which should match nothing.

https://www.w3.org/TR/css-nesting-1/#nest-selector

We should support it (maybe by transform it to the equivalent :not(*) selector)
Comment 1 Radar WebKit Bug Importer 2023-01-10 05:48:33 PST
<rdar://problem/104073866>
Comment 2 Matthieu Dubet 2023-02-02 17:52:43 PST
The editor draft of the CSS Nesting spec changed: 

When used in the selector of a nested style rule, the nesting selector represents the elements matched by the parent rule. When used in any other context, it represents the same elements as :scope in that context (unless otherwise defined).

https://drafts.csswg.org/css-nesting/#nest-selector
Comment 3 Matthieu Dubet 2023-03-10 09:10:59 PST
Pull request: https://github.com/WebKit/WebKit/pull/11366
Comment 4 EWS 2023-03-16 03:40:34 PDT
Committed 261739@main (20329b62061b): <https://commits.webkit.org/261739@main>

Reviewed commits have been landed. Closing PR #11366 and removing active labels.