Bug 250379

Summary: [css-nesting] Implement top-level nesting selector
Product: WebKit Reporter: Matthieu Dubet <m_dubet>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.