Page MenuHomePhabricator

Bug 1830134 - [css-nesting] Process nested rules at cascade data rebuild. r=#style,#layout
ClosedPublic

Authored by emilio on Apr 26 2023, 5:42 PM.
Referenced Files
Unknown Object (File)
Mar 15 2026, 5:50 AM
Unknown Object (File)
Mar 15 2026, 1:19 AM
Unknown Object (File)
Mar 14 2026, 6:13 PM
Unknown Object (File)
Mar 11 2026, 1:22 PM
Unknown Object (File)
Mar 11 2026, 10:19 AM
Unknown Object (File)
Feb 28 2026, 8:19 PM
Unknown Object (File)
Feb 28 2026, 3:41 AM
Unknown Object (File)
Feb 11 2026, 7:31 AM
Subscribers

Details

Summary

More nesting plumbing. Still does nothing because we don't parse the
nested rules.

Should be trivial to prove this patch doesn't change any behavior so
far, but I want to land it on its own because it can have performance
implications.

This follows the pattern of what we do with other rules like layers and
container conditions, that is, keep the ancestor selectors in a stack,
and poke at the last one in order to replace the ancestor.

This changes the behavior of replace_parent_selector as with the newer
version of the spec, stuff like:

div {
  .foo {
    stuff
  }
}

Should work as div .foo. A test is added for this case.

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
This revision is now accepted and ready to land.Apr 27 2023, 9:40 PM