Bug 256647 - [css-nesting] Serialize properties directly in parent group rule only (for the first nested style rule)
Summary: [css-nesting] Serialize properties directly in parent group rule only (for th...
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-05-11 08:03 PDT by Matthieu Dubet
Modified: 2023-05-18 16:09 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-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.