Fri, 18 Apr 2014 09:11:32 -0700
[selectors] Define specificity of selector lists.
selectors/Overview.bs | file | annotate | diff | comparison | revisions | |
selectors/Overview.html | file | annotate | diff | comparison | revisions |
1.1 --- a/selectors/Overview.bs Fri Apr 18 09:08:57 2014 -0700 1.2 +++ b/selectors/Overview.bs Fri Apr 18 09:11:32 2014 -0700 1.3 @@ -3086,6 +3086,10 @@ 1.4 <li>ignore the universal selector 1.5 </ul> 1.6 1.7 + If the selector is a <a>selector list</a>, 1.8 + this number is calculated for each selector in the list, 1.9 + and the specificity of the entire selector is the largest of any individual selector in the list. 1.10 + 1.11 In most cases, a selector has the same specificity for every element it applies to. 1.12 The specificity of a <a href="#matches">:matches()</a> pseudo-class, however, 1.13 is the specificity of the most specific complex selector that matched the given element.
2.1 --- a/selectors/Overview.html Fri Apr 18 09:08:57 2014 -0700 2.2 +++ b/selectors/Overview.html Fri Apr 18 09:11:32 2014 -0700 2.3 @@ -59,7 +59,7 @@ 2.4 </p> 2.5 <h1 class="p-name no-ref" id=title>Selectors Level 4</h1> 2.6 <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft, 2.7 - <span class=dt-updated><span class=value-title title=20140416>16 April 2014</span></span></span></h2> 2.8 + <span class=dt-updated><span class=value-title title=20140418>18 April 2014</span></span></span></h2> 2.9 <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> 2.10 <dt>Feedback:</dt> 2.11 <dd><a href="mailto:www-style@w3.org?subject=%5Bselectors%5D%20feedback">www-style@w3.org</a> 2.12 @@ -945,7 +945,7 @@ 2.13 to a particular subtree or fragment of the document. 2.14 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>, 2.15 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>) 2.16 - 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>). 2.17 + 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>). 2.18 2.19 <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: 2.20 2.21 @@ -2673,7 +2673,7 @@ 2.22 the root of the document. 2.23 2.24 <p> For example, in a DOM document, 2.25 - 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. 2.26 + 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. 2.27 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 2.28 (unless scripting has been used to modify the document). 2.29 2.30 @@ -3196,6 +3196,10 @@ 2.31 <li>ignore the universal selector 2.32 </ul> 2.33 2.34 +<p> If the selector is a <a data-link-type=dfn href=#selector-list title="selector list">selector list</a>, 2.35 + this number is calculated for each selector in the list, 2.36 + and the specificity of the entire selector is the largest of any individual selector in the list. 2.37 + 2.38 <p> In most cases, a selector has the same specificity for every element it applies to. 2.39 The specificity of a <a href=#matches>:matches()</a> pseudo-class, however, 2.40 is the specificity of the most specific complex selector that matched the given element.