W3C home > Mailing lists > Public > public-css-commits@w3.org > September 2011

csswg/selectors4 Overview.html,1.48,1.49 Overview.src.html,1.50,1.51

From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 20 Sep 2011 21:40:38 +0000
To: public-css-commits@w3.org
Message-Id: <E1R683S-0001cl-3D@lionel-hutz.w3.org>
Update of /sources/public/csswg/selectors4
In directory hutz:/tmp/cvs-serv6223

Modified Files:
	Overview.html Overview.src.html 
Log Message:
fix syntax error

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/selectors4/Overview.html,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- Overview.html	16 Sep 2011 20:55:39 -0000	1.48
+++ Overview.html	20 Sep 2011 21:40:35 -0000	1.49
@@ -15,14 +15,14 @@
 
    <h1 id=title>Selectors Level 4</h1>
 
-   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 16 September
+   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 20 September
     2011</h2>
 
    <dl>
     <dt>This version:
 
-    <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110916/">
-             http://www.w3.org/TR/2011/WD-selectors4-20110916</a> -->
+    <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110920/">
+             http://www.w3.org/TR/2011/WD-selectors4-20110920</a> -->
      <a href="http://dev.w3.org/csswg/selectors4">
      http://dev.w3.org/csswg/selectors4</a>
 
@@ -407,40 +407,43 @@
       Reference combinators</a>
     </ul>
 
-   <li><a href="#formal-syntax"><span class=secno>15. </span> Formal
+   <li><a href="#specificity"><span class=secno>15. </span> Calculating a
+    selector's specificity</a>
+
+   <li><a href="#formal-syntax"><span class=secno>16. </span> Formal
     Syntax</a>
     <ul class=toc>
-     <li><a href="#grammar"><span class=secno>15.1. </span> Grammar</a>
+     <li><a href="#grammar"><span class=secno>16.1. </span> Grammar</a>
 
-     <li><a href="#lex"><span class=secno>15.2. </span> Lexical scanner</a>
+     <li><a href="#lex"><span class=secno>16.2. </span> Lexical scanner</a>
     </ul>
 
-   <li><a href="#profiling"><span class=secno>16. </span>Profiles</a>
+   <li><a href="#profiling"><span class=secno>17. </span>Profiles</a>
 
-   <li><a href="#conformance"><span class=secno>17. </span> Conformance</a>
+   <li><a href="#conformance"><span class=secno>18. </span> Conformance</a>
     <ul class=toc>
-     <li><a href="#conventions"><span class=secno>17.1. </span>Document
+     <li><a href="#conventions"><span class=secno>18.1. </span>Document
       Conventions</a>
 
-     <li><a href="#conformance-classes"><span class=secno>17.2. </span>
+     <li><a href="#conformance-classes"><span class=secno>18.2. </span>
       Conformance Classes</a>
 
-     <li><a href="#partial"><span class=secno>17.3. </span> Partial
+     <li><a href="#partial"><span class=secno>18.3. </span> Partial
       Implementations</a>
 
-     <li><a href="#experimental"><span class=secno>17.4. </span> Experimental
+     <li><a href="#experimental"><span class=secno>18.4. </span> Experimental
       Implementations</a>
     </ul>
 
-   <li><a href="#acknowledgements"><span class=secno>18. </span>
+   <li><a href="#acknowledgements"><span class=secno>19. </span>
     Acknowledgements</a>
 
-   <li><a href="#references"><span class=secno>19. </span> References</a>
+   <li><a href="#references"><span class=secno>20. </span> References</a>
     <ul class=toc>
-     <li><a href="#normative-references"><span class=secno>19.1. </span>
+     <li><a href="#normative-references"><span class=secno>20.1. </span>
       Normative References</a>
 
-     <li><a href="#informative-references"><span class=secno>19.2. </span>
+     <li><a href="#informative-references"><span class=secno>20.2. </span>
       Informative References</a>
     </ul>
   </ul>
@@ -2988,9 +2991,27 @@
 
   <p class=issue>This could also be implemented as a functional pseudo-class.
 
-  <p>negation or <a href="#matches">matches</a> pseudo-class is the
-   specificity of its most specific argument. The pseudo-class itself does
-   not count as pseudo-class.
+  <h2 id=specificity><span class=secno>15. </span> Calculating a selector's
+   specificity</h2>
+
+  <p>A selector's specificity is calculated as follows:
+
+  <ul>
+   <li>count the number of ID selectors in the selector (= a)
+
+   <li>count the number of class selectors, attributes selectors, and
+    pseudo-classes in the selector (= b)
+
+   <li>count the number of type selectors and pseudo-elements in the selector
+    (= c)
+
+   <li>ignore the universal selector
+  </ul>
+
+  <p>The specificity of a <a href="#negation">negation</a> or <a
+   href="#matches">matches</a> pseudo-class is the specificity of its most
+   specific argument. The pseudo-class itself does not count as pseudo-class.
+   
 
   <p class=issue>It would probably be better to have match-sensitive
    specificity, if possible. See <a
@@ -3022,9 +3043,9 @@
    specified in an HTML <code>style</code> attribute is described in CSS 2.1.
    <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>.
 
-  <h2 id=formal-syntax><span class=secno>15. </span> Formal Syntax</h2>
+  <h2 id=formal-syntax><span class=secno>16. </span> Formal Syntax</h2>
 
-  <h3 id=grammar><span class=secno>15.1. </span> Grammar</h3>
+  <h3 id=grammar><span class=secno>16.1. </span> Grammar</h3>
 
   <p>The grammar below defines the syntax of Selectors. It is globally LL(1)
    and can be locally LL(2) (but note that most UAs should not use it
@@ -3123,7 +3144,7 @@
     : type_selector | universal | HASH | class | attrib | pseudo
     ;</pre>
 
-  <h3 id=lex><span class=secno>15.2. </span> Lexical scanner</h3>
+  <h3 id=lex><span class=secno>16.2. </span> Lexical scanner</h3>
 
   <p>The following is the <a name=x3>tokenizer</a>, written in Flex (see <a
    href="#FLEX" rel=biblioentry>[FLEX]<!--{{!FLEX}}--></a>) notation. The
@@ -3191,7 +3212,7 @@
 
   .                return *yytext;</pre>
 
-  <h2 id=profiling><span class=secno>16. </span>Profiles</h2>
+  <h2 id=profiling><span class=secno>17. </span>Profiles</h2>
 
   <p>Each specification using Selectors must define the subset of Selectors
    it allows and excludes, and describe the local meaning of all the
@@ -3352,9 +3373,9 @@
    </ol>
   </div>
 
-  <h2 id=conformance><span class=secno>17. </span> Conformance</h2>
+  <h2 id=conformance><span class=secno>18. </span> Conformance</h2>
 
-  <h3 id=conventions><span class=secno>17.1. </span>Document Conventions</h3>
+  <h3 id=conventions><span class=secno>18.1. </span>Document Conventions</h3>
 
   <p>Conformance requirements are expressed with a combination of descriptive
    assertions and RFC 2119 terminology. The key words “MUST”, “MUST
@@ -3381,7 +3402,7 @@
 
   <p class=note>Note, this is an informative note.
 
-  <h3 id=conformance-classes><span class=secno>17.2. </span> Conformance
+  <h3 id=conformance-classes><span class=secno>18.2. </span> Conformance
    Classes</h3>
 
   <p>Conformance to Selectors Level 4 is defined for three conformance
@@ -3427,14 +3448,14 @@
    selectors. (In the case of CSS, the entire rule in which the selector is
    used is effectively dropped.)
 
-  <h3 id=partial><span class=secno>17.3. </span> Partial Implementations</h3>
+  <h3 id=partial><span class=secno>18.3. </span> Partial Implementations</h3>
 
   <p>So that authors can exploit the forward-compatible parsing rules to
    assign fallback values, UAs <strong>must</strong> treat as <a
    href="#invalid">invalid</a> any selectors for which they have no usable
    level of support.
 
-  <h3 id=experimental><span class=secno>17.4. </span> Experimental
+  <h3 id=experimental><span class=secno>18.4. </span> Experimental
    Implementations</h3>
 
   <p>To avoid clashes with future Selectors features, the Selectors
@@ -3457,7 +3478,7 @@
   and does not cover all possible combined cases of Selectors.</p>
 -->
 
-  <h2 id=acknowledgements><span class=secno>18. </span> Acknowledgements</h2>
+  <h2 id=acknowledgements><span class=secno>19. </span> Acknowledgements</h2>
 
   <p>The CSS working group would like to thank everyone who contributed to
    the <a href="http://www.w3.org/TR/css3-selectors">previous Selectors</a>
@@ -3468,9 +3489,9 @@
    the following for their specific contributions to Selectors Level 4: L.
    David Baron Andrew Fedoniouk Ian Hickson Grey Hodge Jason Cranford Teague
 
-  <h2 id=references><span class=secno>19. </span> References</h2>
+  <h2 id=references><span class=secno>20. </span> References</h2>
 
-  <h3 id=normative-references><span class=secno>19.1. </span> Normative
+  <h3 id=normative-references><span class=secno>20.1. </span> Normative
    References</h3>
   <!--begin-normative-->
   <!-- Sorted by label -->
@@ -3533,7 +3554,7 @@
   </dl>
   <!--end-normative-->
 
-  <h3 id=informative-references><span class=secno>19.2. </span> Informative
+  <h3 id=informative-references><span class=secno>20.2. </span> Informative
    References</h3>
   <!--begin-informative-->
   <!-- Sorted by label -->

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/selectors4/Overview.src.html,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- Overview.src.html	16 Sep 2011 20:55:39 -0000	1.50
+++ Overview.src.html	20 Sep 2011 21:40:35 -0000	1.51
@@ -2356,8 +2356,6 @@
 
   <p class="issue">This could also be implemented as a functional pseudo-class.</p>
 
-<h3 id="
-
 <h2 id=specificity>
 Calculating a selector's specificity</h2>
 
Received on Tuesday, 20 September 2011 21:40:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 20 September 2011 21:40:41 GMT