Skip to content

Commit

Permalink
[selectors-4] Define specificity of :has() to match :matches() (and p…
Browse files Browse the repository at this point in the history
…rior behavior under ! proposal). #2143 (comment)
  • Loading branch information
fantasai committed Jan 16, 2018
1 parent 6421e57 commit a321974
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions selectors-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3236,13 +3236,14 @@ Calculating a selector's specificity</h2>

<ul>
<li>
The specificity of a '':matches()'' pseudo-class is replaced by
The specificity of a '':matches()'' or '':has()'' pseudo-class is replaced by
the specificity applicable to its selector list argument.
(When '':matches()'' contains only compound selectors,
the full selector's specificity is thus equivalent to
expanding out all the combinations in full, without '':matches()'';
fully generalized, the specificity of '':matches()'' is
the specificity of the most specific selector within it that matches.)
the specificity of the most specific selector within it that matches.
The behavior for comma-separated arguments to '':has()'' is analogous.)
<li>
Analogously, the specificity of an '':nth-child()'' or '':nth-last-child()'' selector
is the specificity of the pseudo class itself (counting as one pseudo-class selector)
Expand Down

0 comments on commit a321974

Please sign in to comment.