Bug 256647

Summary: [css-nesting] Serialize properties directly in parent group rule only (for the first nested style rule)
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-05-11 08:03:46 PDT
Orphaned properties in group rules are implicitly added to a style rule with '&' as selector ; this implicit rule should not be serialized.

foo {
    @media screen {
        color: green;
    }
}

is implemented as 

foo {
    @media screen {
        & {
            color: green;
        }
    }
}

but this should not appear in the CSS OM serialization
Comment 1 Radar WebKit Bug Importer 2023-05-11 08:04:15 PDT
<rdar://problem/109208359>
Comment 2 Matthieu Dubet 2023-05-11 08:15:01 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13758
Comment 3 EWS 2023-05-12 02:46:00 PDT
Committed 264003@main (e07871e21ea8): <https://commits.webkit.org/264003@main>

Reviewed commits have been landed. Closing PR #13758 and removing active labels.
Comment 4 EWS 2023-05-18 16:09:27 PDT
Committed 259548.767@safari-7615-branch (168b349a71f0): <https://commits.webkit.org/259548.767@safari-7615-branch>

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