Skip to content

Commit 353bbef

Browse files
committed
[selectors] Remove issue about match-sensitive specificity. Specify that the specificity of a :not() is the maximum of its branches.
1 parent ab859d5 commit 353bbef

2 files changed

Lines changed: 13 additions & 15 deletions

File tree

selectors/Overview.html

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3918,14 +3918,13 @@ <h2 id=specificity><span class=secno>15. </span> Calculating a selector's
39183918
<li>ignore the universal selector
39193919
</ul>
39203920

3921-
<p>The specificity of a <a href="#negation">negation</a> or <a
3922-
href="#matches">matches</a> pseudo-class is the specificity of its most
3923-
specific argument. The pseudo-class itself does not count as pseudo-class.
3924-
3925-
<p class=issue>It would probably be better to have match-sensitive
3926-
specificity, if possible. See <a
3927-
href="http://lists.w3.org/Archives/Public/www-style/2010Sep/0534.html">dbaron's
3928-
message</a>.
3921+
<p>The specificity of a <a href="#matches">:matches()</a> pseudo-class is
3922+
the specificity of its most specific argument. The specificity of a <a
3923+
href="#negation">:negation()</a> pseudo-class is the maximum specificity
3924+
of any of its component selectors. In either case, the pseudo-class itself
3925+
does not contribute any additional specificity. For example,
3926+
<code>:matches(em, strong)</code> has a specificity of (0,0,1), like a tag
3927+
selector.
39293928

39303929
<p> Specificities are compared by comparing the three components in order:
39313930
the specificity with a larger <var>a</var> value is more specific; if the

selectors/Overview.src.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,13 +2841,12 @@ <h2 id="specificity">
28412841
<li>ignore the universal selector
28422842
</ul>
28432843

2844-
<p>The specificity of a <a href="#negation">negation</a> or
2845-
<a href="#matches">matches</a> pseudo-class is the specificity
2846-
of its most specific argument. The pseudo-class itself does not
2847-
count as pseudo-class.
2848-
2849-
<p class="issue">It would probably be better to have match-sensitive
2850-
specificity, if possible. See <a href="http://lists.w3.org/Archives/Public/www-style/2010Sep/0534.html">dbaron's message</a>.
2844+
<p>The specificity of a <a href="#matches">:matches()</a> pseudo-class is
2845+
the specificity of its most specific argument.
2846+
The specificity of a <a href="#negation">:negation()</a> pseudo-class is
2847+
the maximum specificity of any of its component selectors.
2848+
In either case, the pseudo-class itself does not contribute any additional specificity.
2849+
For example, <code>:matches(em, strong)</code> has a specificity of (0,0,1), like a tag selector.
28512850

28522851
<p>
28532852
Specificities are compared by comparing the three components in order:

0 commit comments

Comments
 (0)