Closed
Description
CSS Nesting does not clearly define where &
is allowed to appear in a selector. In Chrome/FF, these selectors are all invalid:
html|&
html&|*
#&id
.&class
[&]
[attr=&]
[attr=value &]
While the position of &
does not make a difference in its behavior, it should only match <type-selector>
and <subclass-selector>
in <compound-selector>
.
I would also like to suggest to define this again (cf. #7503):
An invalid selector remains invalid when some of its parts are nested.
In Chrome/FF, the nested rule in ::before, div { &:first-child {} }
is valid whereas the version without nesting, ::before:first-child, div:first-child {}
is not (because :first-child
is not allowed to be compounded to ::before
).