-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Description
A significant motivation behind changing the nesting syntax was making selectors easier to copy/paste between contexts.
- [css-nesting-1] Syntax Invites Errors #7834
- [selectors][css-nesting] Move nest-containing and nest-prefixed selector definitions to Selectors #5745
This changed .foo { & .bar{} } into .foo { .bar{} }
Both .foo and .bar can be copy/pasted to any other context, or could have been copy/pasted from any other context.
.foo { > .bar{} } however can not be copied to the root of the stylesheet.
/* invalid */
> .bar{}Currently I think it is only allowed in :
@scope- nested context
:has()
Can > .bar{} be equal to :scope > .bar{} in all contexts?
All the pseudo's that accept selectors will need to be defined :
:is(> .foo):host(> .foo)- ...
Maybe :scope is not suitable everywhere?