File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -709,6 +709,38 @@ Nesting Selector: the ''&'' selector {#nest-selector}
709709 </pre>
710710 </div>
711711
712+ The [=nesting selector=] cannot represent pseudo-elements
713+ (identical to the behavior of the '':is()'' pseudo-class).
714+
715+ <div class=example>
716+ For example, in the following style rule:
717+
718+ <pre class=lang-css>
719+ .foo, .foo::before, .foo::after {
720+ color: red;
721+
722+ &:hover { color: blue; }
723+ }
724+ </pre>
725+
726+ the ''&'' only represents the elements matched by ''.foo'' ;
727+ in other words, it's equivalent to:
728+
729+ <pre class=lang-css>
730+ .foo, .foo::before, .foo::after {
731+ color: red;
732+ }
733+ .foo:hover {
734+ color: blue;
735+ }
736+ </pre>
737+ </div>
738+
739+ Issue: We'd like to relax this restriction,
740+ but need to do so simultaneously for both '':is()'' and ''&'' ,
741+ since they're intentionally built on the same underlying mechanisms.
742+ (<a href="https://github.com/w3c/csswg-drafts/issues/7433">Issue 7433</a> )
743+
712744 The <a>specificity</a> of the <a>nesting selector</a>
713745 is equal to the largest specificity among the complex selectors
714746 in the parent style rule's selector list
You can’t perform that action at this time.
0 commit comments