You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<td>an E element that matches <a>compound selector</a><var>s1</var>
144
144
and/or <a>compound selector</a><var>s2</var> but contributes no specificity.
145
145
<td>[[#zero-matches]]
@@ -1199,20 +1199,18 @@ The Negation Pseudo-class: '':not()''</h3>
1199
1199
1200
1200
1201
1201
<h3 id="zero-matches">
1202
-
The Specificity-adjustment Pseudo-class: '':something()''</h3>
1202
+
The Specificity-adjustment Pseudo-class: '':where()''</h3>
1203
1203
1204
-
The Specificity-adjustment pseudo-class, <dfn id="something-pseudo">:something()</dfn>,
1204
+
The Specificity-adjustment pseudo-class, <dfn id="where-pseudo">:where()</dfn>,
1205
1205
is a functional pseudo-class
1206
1206
with the same syntax and functionality as '':matches()''.
1207
-
Unlike '':matches()'', neither the '':something'' pseudo-class, nor any of its arguments
1207
+
Unlike '':matches()'', neither the '':where'' pseudo-class, nor any of its arguments
1208
1208
contribute to the specificity of the selector--
1209
1209
its specificity is always zero.
1210
1210
1211
1211
This is useful for introducing filters in a selector
1212
1212
while keeping the associated style declarations easy to override.
1213
1213
1214
-
ISSUE: This pseudo-class needs a name. See <a href="https://github.com/w3c/csswg-drafts/issues/1170">previous discussion</a>, <a href="https://github.com/w3c/csswg-drafts/issues/2143">open issue</a>.
1215
-
1216
1214
<div class="example">
1217
1215
Below is a common example where the specificity heuristic fails
1218
1216
to match author expectations:
@@ -1228,10 +1226,10 @@ The Specificity-adjustment Pseudo-class: '':something()''</h3>
1228
1226
}
1229
1227
</pre>
1230
1228
1231
-
However, by using '':something()'' the author can explicitly declare their intent:
1229
+
However, by using '':where()'' the author can explicitly declare their intent:
1232
1230
1233
1231
<pre>
1234
-
a:something(:not(:hover)) {
1232
+
a:where(:not(:hover)) {
1235
1233
text-decoration: none;
1236
1234
}
1237
1235
@@ -3332,7 +3330,7 @@ Calculating a selector's specificity</h2>
3332
3330
The specificity of a '':not()'' pseudo-class is replaced by
3333
3331
the specificity of the most specific complex selector in its selector list argument.
3334
3332
<li>
3335
-
The specificity of a '':something()'' pseudo-class is replaced by zero.
3333
+
The specificity of a '':where()'' pseudo-class is replaced by zero.
3336
3334
</ul>
3337
3335
3338
3336
<div class="example">
@@ -3343,7 +3341,7 @@ Calculating a selector's specificity</h2>
3343
3341
a specificity of (0,0,1)--like a tag selector--when matched against <code><em></code>,
3344
3342
and a specificity of (1,0,0)--like an ID selector--when matched against <code><em id=foo></code>.
3345
3343
<li>
3346
-
''div:something(em, #foo#bar#baz)'' has
3344
+
''div:where(em, #foo#bar#baz)'' has
3347
3345
a specificity of (0,0,1): only the ''div'' contributes to selector specificity.
0 commit comments