-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Branching off of #7233...
Currently, >> is a shorthand for writing an @scope. That is, anytime you see .foo >> .bar {...}, it's equivalent to @scope .foo { .bar {...}}.
Now that we've agreed to add ++ (or ~~) to do sibling proximity, it would be nice to keep the consistency between the two syntaxes.
I suggest @scope siblings ... {}, where the ... is the current scope prelude stuff. If you specify siblings the lower bound, and all contained selectors, are auto-scoped to be siblings of the upper bound element, and we apply sibling-distance proximity as the tiebreaker rather than ancestor-distance proximity.
Need to be careful with the definitions to make sure descendant-scopes can still be nested; I guess descendant-scopes would scope the upper bound as a sibling but switch back to normal scoping for their lower bound. I believe this'll reproduce the behavior of .foo >> .bar ++ .baz >> .qux.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status