diff --git a/selectors-4/Overview.bs b/selectors-4/Overview.bs
index 5873b4f4ac5..39333419caf 100644
--- a/selectors-4/Overview.bs
+++ b/selectors-4/Overview.bs
@@ -133,7 +133,7 @@ Selectors Overview
- E:matches(s1, s2, …)
+ | E:is(s1, s2, …)
| an E element that matches compound selector s1
and/or compound selector s2
| [[#matches]]
@@ -913,7 +913,7 @@ Pseudo-classing Pseudo-elements
unless otherwise-specified, none of these pseudo-classes
will match on the pseudo-element.
- Issue: Clarify that '':not()'' and '':matches()'' can be used when containing above-mentioned pseudos.
+ Issue: Clarify that '':not()'' and '':is()'' can be used when containing above-mentioned pseudos.
For example, since the '':hover'' pseudo-class specifies
@@ -1108,19 +1108,19 @@ Selector Lists
-The Matches-any Pseudo-class: '':matches()''
+The Matches-any Pseudo-class: '':is()''
- The matches-any pseudo-class, :matches(),
+ The matches-any pseudo-class, :is(),
is a functional pseudo-class taking a selector list as its argument.
It represents an element that is represented by its argument.
- Note: The specificity of the '':matches()'' pseudo-class
+ Note: The specificity of the '':is()'' pseudo-class
is replaced by the specificity of its most specific argument.
- Thus, a selector written with '':matches()''
+ Thus, a selector written with '':is()''
does not necessarily have equivalent specificity
- to the equivalent selector written without '':matches()''
+ to the equivalent selector written without '':is()''
For example, if we have
- '':matches(ul, ol, .list) > [hidden]'' and ''ul > [hidden], ol > [hidden], .list > [hidden]''
+ '':is(ul, ol, .list) > [hidden]'' and ''ul > [hidden], ol > [hidden], .list > [hidden]''
a ''[hidden]]'' child of an <{ol}> matches the first selector
with a specificity of (0,2,0)
whereas it matches the second selector
@@ -1128,11 +1128,11 @@ The Matches-any Pseudo-class: '':matches()''
See [[#specificity-rules]].
Pseudo-elements cannot be represented by the matches-any pseudo-class;
- they are not valid within '':matches()''.
+ they are not valid within '':is()''.
Default namespace declarations do not affect the compound selector
representing the subject of any selector
- within a '':matches()'' pseudo-class,
+ within a '':is()'' pseudo-class,
unless that compound selector contains
an explicit universal selector or type selector.
@@ -1142,15 +1142,16 @@ The Matches-any Pseudo-class: '':matches()''
is not limited to only matching elements in the default namespace
that are being hovered or focused.
- *|*:matches(:hover, :focus)
+ *|*:is(:hover, :focus)
The following selector, however, represents only hovered or focused
elements that are in the default namespace, because it uses an explicit
- universal selector within the '':matches()'' notation:
+ universal selector within the '':is()'' notation:
- *|*:matches(*:hover, *:focus)
+ *|*:is(*:hover, *:focus)
+ User agents may support ':matches()' as a deprecated name for '':is()''.
The Negation Pseudo-class: '':not()''
@@ -1164,7 +1165,7 @@ The Negation Pseudo-class: '':not()''
Note: The specificity of the '':not()'' pseudo-class
is replaced by the specificity of the most specific selector in its argument;
- thus it has the exact behavior of '':not(:matches(argument))''.
+ thus it has the exact behavior of '':not(:is(argument))''.
See [[#specificity-rules]].
Pseudo-elements cannot be represented by the negation pseudo-class;
@@ -1186,13 +1187,13 @@ The Negation Pseudo-class: '':not()''
html|*:not(:link):not(:visited)
- As with '':matches()'',
+ As with '':is()'',
default namespace declarations do not affect the compound selector
representing the subject of any selector
within a '':not()'' pseudo-class,
unless that compound selector contains
an explicit universal selector or type selector.
- (See '':matches()'' for examples.)
+ (See '':is()'' for examples.)
Note: The '':not()'' pseudo-class allows useless selectors to be written.
For instance '':not(*|*)'', which represents no element at all,
@@ -1204,8 +1205,8 @@ The Specificity-adjustment Pseudo-class: '':where()''
The Specificity-adjustment pseudo-class, :where(),
is a functional pseudo-class
- with the same syntax and functionality as '':matches()''.
- Unlike '':matches()'', neither the '':where'' pseudo-class, nor any of its arguments
+ with the same syntax and functionality as '':is()''.
+ Unlike '':is()'', neither the '':where'' pseudo-class, nor any of its arguments
contribute to the specificity of the selector--
its specificity is always zero.
@@ -1982,7 +1983,7 @@ The Hyperlink Pseudo-class: '':any-link''
For example, in [[HTML5]], any a, area, or link elements with an href attribute
are hyperlinks, and thus match :any-link.
It matches an element if the element would match either '':link'' or '':visited'',
- and is equivalent to '':matches(:link, :visited)''.
+ and is equivalent to '':is(:link, :visited)''.
@@ -2407,7 +2408,7 @@ The Current-element Pseudo-class: '':current''
The :current pseudo-class represents the
element, or an ancestor of the element, that is currently being displayed.
- Its alternate form :current(), like '':matches()'',
+ Its alternate form :current(), like '':is()'',
takes a list of compound selectors as its argument: it represents the
'':current'' element that matches the argument or, if that does
not match, the innermost ancestor of the '':current'' element
@@ -3314,7 +3315,7 @@ Calculating a selector's specificity
-
- The specificity of a '':matches'', '':not()'', or '':has()'' pseudo-class
+ The specificity of a '':is'', '':not()'', or '':has()'' pseudo-class
is replaced by the specificity of
the most specific complex selector in its selector list argument.
-
@@ -3330,7 +3331,7 @@ Calculating a selector's specificity
For example:
-
- '':matches(em, #foo)'' has
+ '':is(em, #foo)'' has
a specificity of (1,0,0)--
like an ID selector--
when matched against any of
@@ -3379,7 +3380,7 @@ Calculating a selector's specificity
LI.red.level /* a=0 b=2 c=1 */
#x34y /* a=1 b=0 c=0 */
#s12:not(FOO) /* a=1 b=0 c=1 */
- .foo :matches(.bar, #baz)
+ .foo :is(.bar, #baz)
/* a=1 b=1 c=0 */
@@ -3792,7 +3793,7 @@ Appendix A: Guidance on Mapping Source Documents & Data to an Element Tree
that must be explicitly defined.
Issue: Some pseudo-classes are *syntactical*,
- like '':has()'' and '':matches()'',
+ like '':has()'' and '':is()'',
and thus should always work.
Need to indicate that somewhere.
Probably the structural pseudos always work
@@ -3912,11 +3913,13 @@ Changes
Significant changes since the 2 February 2018 Working Draft:
+ - Named the matches-any selector to '':is()''.
+ (Issue 3258)
- Named the zero-specificity selector to '':where()''.
(Issue 2143)
- Removed '':blank'' and defined '':empty'' to ignored white-space–only nodes.
(Issue 1967)
-
- Changed the specificity of '':matches()'', '':where()'', and '':nth-child()''
+
- Changed the specificity of '':is()'', '':where()'', and '':nth-child()''
to not depend on which selector argument matched.
(Issue 1027)
@@ -3925,7 +3928,7 @@ Changes
- Added the '':target-within'', '':focus-within'', '':focus-visible'', '':playing'', and '':paused'' pseudo-classes.
-
- Added a zero-specificity '':matches()''-type pseudo-class, with name TBD.
+
- Added a zero-specificity '':is()''-type pseudo-class, with name TBD.
- Replaced subject indicator (''!'') feature with '':has()''.
- Replaced the '':nth-match()'' and '':nth-last-match()'' selectors
with '':nth-child(… of selector)'' and '':nth-last-child(… of selector)''.
@@ -3959,7 +3962,7 @@ Changes
- - Removed restriction on combinators within '':matches()'' and '':not()'';
+
- Removed restriction on combinators within '':is()'' and '':not()'';
see discussion.
- Defined specificity of a selector list. (Why?)
- Required quotes around '':lang()'' values involving an asterisk;
@@ -3973,9 +3976,9 @@ Changes
- Added '':placeholder-shown'' pseudo-classes.
-
- Released some restrictions on '':matches()'' and '':not()''.
+
- Released some restrictions on '':is()'' and '':not()''.
- Defined fast and complete Selectors profiles (now called live and snapshot).
-
- Improved definition of specificity to better handle :matches().
+
- Improved definition of specificity to better handle :is().
- Updated grammar.
- Cleaned up definition of <> notation.
- Added definition of scope-relative selectors, changed scope-constrained to scope-filtered for less confusion with scope-contained.
|