A significant motivation behind changing the nesting syntax was making selectors easier to copy/paste between contexts.
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.
Currently I think it is only allowed in :
@scope
- nested context
:has()
#7854 (comment)
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?
A significant motivation behind changing the nesting syntax was making selectors easier to copy/paste between contexts.
This changed
.foo { & .bar{} }into.foo { .bar{} }Both
.fooand.barcan 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.Currently I think it is only allowed in :
@scope:has()#7854 (comment)
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
:scopeis not suitable everywhere?