From cd20e0cf3f7e213d40477dc763dfdc0bde4607b1 Mon Sep 17 00:00:00 2001 From: fantasai Date: Mon, 7 Nov 2022 20:28:38 -0500 Subject: [PATCH] [selectors-4] Allow logical combination pseudos wherever their arguments are themselves valid. #7085 --- selectors-4/Overview.bs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/selectors-4/Overview.bs b/selectors-4/Overview.bs index bab506d87a5..339df55d7d7 100644 --- a/selectors-4/Overview.bs +++ b/selectors-4/Overview.bs @@ -812,8 +812,6 @@ Pseudo-classing Pseudo-elements unless otherwise-specified, none of these pseudo-classes will match on the pseudo-element. - Issue: Clarify that '':not()'' and '':is()'' can be used when containing above-mentioned pseudos. -
For example, since the '':hover'' pseudo-class specifies that it can apply to any pseudo-element, @@ -831,8 +829,14 @@ Pseudo-classing Pseudo-elements whereas ''::first-line:hover'' only matches if the first line itself is hovered.
+ 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 user action pseudo-classes + (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. @@ -988,6 +992,22 @@ Invalid Selectors and Error Handling

Logical Combinations

+ Selector logic can be manipulated by + [=compound selector|compounding=] (logical AND), + [=selector lists=] (logical OR), + and the logical combination pseudo-classes + '':is()'', '':where()'', and '':not()''. + The [=logical combination pseudo-classes=] + are allowed anywhere that any other [=pseudo-classes=] are allowed, + but pass any restrictions to their arguments. + (For example, if only [=compound selectors=] are allowed, + then only [=compound selectors=] are valid within an '':is()''.) + + Note: Since inside '':is()'' and '':where()'' + invalid arguments are dropped without invaliding the [=pseudo-class=] itself, + selector arguments that are invalidated by contextual restrictions + likewise do not invalidate the '':is()'' pseudo-class itself. +

Selector Lists