|
59 | 59 | </p> |
60 | 60 | <h1 class="p-name no-ref" id=title>Selectors Level 4</h1> |
61 | 61 | <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft, |
62 | | - <span class=dt-updated><span class=value-title title=20140416>16 April 2014</span></span></span></h2> |
| 62 | + <span class=dt-updated><span class=value-title title=20140418>18 April 2014</span></span></span></h2> |
63 | 63 | <div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/selectors>http://dev.w3.org/csswg/selectors</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/selectors/>http://www.w3.org/TR/selectors/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/selectors>http://dev.w3.org/csswg/selectors</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-selectors4-20130502/ rel=previous>http://www.w3.org/TR/2013/WD-selectors4-20130502/</a><dd><a href=http://www.w3.org/TR/2012/WD-selectors4-20120823/ rel=previous>http://www.w3.org/TR/2012/WD-selectors4-20120823/</a><dd><a href=http://www.w3.org/TR/2011/WD-selectors4-20110929/ rel=previous>http://www.w3.org/TR/2011/WD-selectors4-20110929/</a> |
64 | 64 | <dt>Feedback:</dt> |
65 | 65 | <dd><a href="mailto:www-style@w3.org?subject=%5Bselectors%5D%20feedback">www-style@w3.org</a> |
@@ -945,7 +945,7 @@ <h3 class="heading settled heading" data-level=3.4 id=scoping><span class=secno> |
945 | 945 | to a particular subtree or fragment of the document. |
946 | 946 | The root of the scoping subtree is called the <dfn data-dfn-type=dfn data-export="" id=scoping-root>scoping root<a class=self-link href=#scoping-root></a></dfn>, |
947 | 947 | and may be either a true element (the <dfn data-dfn-type=dfn data-export="" id=scoping-element>scoping element<a class=self-link href=#scoping-element></a></dfn>) |
948 | | - or a <dfn data-dfn-type=dfn data-export="" id=virtual-scoping-root title="virtual scoping root">virtual<a class=self-link href=#virtual-scoping-root></a></dfn> one (such as a <a class=idl-code data-link-type=interface title=documentfragment>DocumentFragment</a>). |
| 948 | + or a <dfn data-dfn-type=dfn data-export="" id=virtual-scoping-root title="virtual scoping root">virtual<a class=self-link href=#virtual-scoping-root></a></dfn> one (such as a <a class=idl-code data-link-type=interface href=http://dom.spec.whatwg.org/#documentfragment title=documentfragment>DocumentFragment</a>). |
949 | 949 |
|
950 | 950 | <p> There are two <dfn data-dfn-type=dfn data-export="" id=scoping-method- title="scoping method | selector scoping method">scoping methods<a class=self-link href=#scoping-method-></a></dfn> for selectors: |
951 | 951 |
|
@@ -2673,7 +2673,7 @@ <h3 class="heading settled heading" data-level=12.1 id=the-root-pseudo><span cla |
2673 | 2673 | the root of the document. |
2674 | 2674 |
|
2675 | 2675 | <p> For example, in a DOM document, |
2676 | | - the <a class=css data-link-type=maybe href=#root-pseudo title=:root>:root</a> pseudo-class matches the root element of the <a class=idl-code data-link-type=interface href=http://www.w3.org/html/wg/drafts/html/CR/infrastructure.html#dom-document title=document>Document</a> object. |
| 2676 | + the <a class=css data-link-type=maybe href=#root-pseudo title=:root>:root</a> pseudo-class matches the root element of the <a class=idl-code data-link-type=interface href=http://dom.spec.whatwg.org/#document title=document>Document</a> object. |
2677 | 2677 | In HTML, this would be the <a data-link-type=element href=http://www.w3.org/html/wg/drafts/html/CR/semantics.html#the-html-element title=html>html</a> element |
2678 | 2678 | (unless scripting has been used to modify the document). |
2679 | 2679 |
|
@@ -3196,6 +3196,10 @@ <h2 class="heading settled heading" data-level=15 id=specificity><span class=sec |
3196 | 3196 | <li>ignore the universal selector |
3197 | 3197 | </ul> |
3198 | 3198 |
|
| 3199 | +<p> If the selector is a <a data-link-type=dfn href=#selector-list title="selector list">selector list</a>, |
| 3200 | + this number is calculated for each selector in the list, |
| 3201 | + and the specificity of the entire selector is the largest of any individual selector in the list. |
| 3202 | + |
3199 | 3203 | <p> In most cases, a selector has the same specificity for every element it applies to. |
3200 | 3204 | The specificity of a <a href=#matches>:matches()</a> pseudo-class, however, |
3201 | 3205 | is the specificity of the most specific complex selector that matched the given element. |
|
0 commit comments