Skip to content

Commit b8abc09

Browse files
committed
[selectors] Add example of :matches() specificity. Also, typo.
1 parent ce57f47 commit b8abc09

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

selectors/Overview.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4224,10 +4224,18 @@ <h2 id=specificity><span class=secno>15. </span> Calculating a selector's
42244224
<!--
42254225
-->#x34y /* a=1 b=0 c=0 */
42264226
<!--
4227-
-->#s12:not(FOO) /* a=1 b=0 c=1 */</pre>
4227+
-->#s12:not(FOO) /* a=1 b=0 c=1 */
4228+
<!--
4229+
-->.foo :matches(.bar, #baz)
4230+
<!--
4231+
--> /* Either a=1 b=1 c=0
4232+
<!--
4233+
--> or a=0 b=2 c=0, depending
4234+
<!--
4235+
--> on the element being matched. */</pre>
42284236
</div>
42294237

4230-
<p class=note><strong>Note:</strong> Repeated occurrances of the same
4238+
<p class=note><strong>Note:</strong> Repeated occurrences of the same
42314239
simple selector are allowed and do increase specificity.
42324240

42334241
<p class=note><strong>Note:</strong> The specificity of the styles

selectors/Overview.src.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3052,10 +3052,15 @@ <h2 id="specificity">
30523052
-->UL OL LI.red /* a=0 b=1 c=3 */&#xa;<!--
30533053
-->LI.red.level /* a=0 b=2 c=1 */&#xa;<!--
30543054
-->#x34y /* a=1 b=0 c=0 */&#xa;<!--
3055-
-->#s12:not(FOO) /* a=1 b=0 c=1 */</pre>
3055+
-->#s12:not(FOO) /* a=1 b=0 c=1 */&#xa;<!--
3056+
-->.foo :matches(.bar, #baz)&#xa;<!--
3057+
--> /* Either a=1 b=1 c=0&#xa;<!--
3058+
--> or a=0 b=2 c=0, depending&#xa;<!--
3059+
--> on the element being matched. */</pre>
3060+
30563061
</div>
30573062

3058-
<p class="note"><strong>Note:</strong> Repeated occurrances of the
3063+
<p class="note"><strong>Note:</strong> Repeated occurrences of the
30593064
same simple selector are allowed and do increase specificity.
30603065

30613066
<p class="note"><strong>Note:</strong> The specificity of the styles

0 commit comments

Comments
 (0)