Skip to content

Commit b7f9e82

Browse files
committed
[selectors-4] Allow logical combination pseudos wherever their arguments are themselves valid. #7085
1 parent d50d756 commit b7f9e82

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

selectors-4/Overview.bs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,6 @@ Pseudo-classing Pseudo-elements</h4>
812812
unless otherwise-specified, none of these <a>pseudo-classes</a>
813813
will match on the <a>pseudo-element</a>.
814814

815-
Issue: Clarify that '':not()'' and '':is()'' can be used when containing above-mentioned pseudos.
816-
817815
<div class="example">
818816
For example, since the '':hover'' pseudo-class specifies
819817
that it can apply to any pseudo-element,
@@ -831,8 +829,14 @@ Pseudo-classing Pseudo-elements</h4>
831829
whereas ''::first-line:hover'' only matches if the first line itself is hovered.
832830
</div>
833831

832+
The [=logical combination pseudo-classes=]
833+
'':not()'', '':is()'', and '':where()''
834+
are also valid immediately following a [=pseudo-element=]
835+
provided their arguments all adhere to the above restriction.
836+
834837
Note: Note that, unless otherwise specified in a future specification,
835838
pseudo-classes other than the <a href="#useraction-pseudos">user action pseudo-classes</a>
839+
(and logical combination pseudo-classes restricted to them)
836840
are not valid when compounded to a pseudo-element;
837841
so, for example, ''::before:first-child'' is an invalid selector.
838842

@@ -988,6 +992,13 @@ Invalid Selectors and Error Handling</h3>
988992
<h2 id="logical-combination">
989993
Logical Combinations</h2>
990994

995+
Selector logic can be manipulated by
996+
[=compound selector|compounding=] (logical AND),
997+
[=selector lists=] (logical OR),
998+
and the <dfn>logical combination pseudo-classes</dfn>
999+
'':is()'', '':where()'', and '':not()'',
1000+
which are allowed in any context where their arguments are each themselves valid.
1001+
9911002
<h3 id="grouping">
9921003
Selector Lists</h3>
9931004

0 commit comments

Comments
 (0)