Skip to content

Commit

Permalink
[selectors-4] Allow logical combination pseudos wherever their argume…
Browse files Browse the repository at this point in the history
…nts are themselves valid. w3c#7085
  • Loading branch information
fantasai committed Dec 9, 2022
1 parent d50d756 commit b7f9e82
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions selectors-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,6 @@ Pseudo-classing Pseudo-elements</h4>
unless otherwise-specified, none of these <a>pseudo-classes</a>
will match on the <a>pseudo-element</a>.

Issue: Clarify that '':not()'' and '':is()'' can be used when containing above-mentioned pseudos.

<div class="example">
For example, since the '':hover'' pseudo-class specifies
that it can apply to any pseudo-element,
Expand All @@ -831,8 +829,14 @@ Pseudo-classing Pseudo-elements</h4>
whereas ''::first-line:hover'' only matches if the first line itself is hovered.
</div>

The [=logical combination pseudo-classes=]
'':not()'', '':is()'', and '':where()''
are also valid immediately following a [=pseudo-element=]
provided their arguments all adhere to the above restriction.

Note: Note that, unless otherwise specified in a future specification,
pseudo-classes other than the <a href="#useraction-pseudos">user action pseudo-classes</a>
(and logical combination pseudo-classes restricted to them)
are not valid when compounded to a pseudo-element;
so, for example, ''::before:first-child'' is an invalid selector.

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

Selector logic can be manipulated by
[=compound selector|compounding=] (logical AND),
[=selector lists=] (logical OR),
and the <dfn>logical combination pseudo-classes</dfn>
'':is()'', '':where()'', and '':not()'',
which are allowed in any context where their arguments are each themselves valid.

<h3 id="grouping">
Selector Lists</h3>

Expand Down

0 comments on commit b7f9e82

Please sign in to comment.