- From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 27 Jun 2011 22:45:16 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/selectors4 In directory hutz:/tmp/cvs-serv6176 Modified Files: Overview.html Overview.src.html Log Message: Add :nth-match to address <http://lists.w3.org/Archives/Public/www-style/2009Mar/0146.html> and similar use cases Index: Overview.html =================================================================== RCS file: /sources/public/csswg/selectors4/Overview.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Overview.html 20 Jun 2011 17:33:55 -0000 1.12 +++ Overview.html 27 Jun 2011 22:45:14 -0000 1.13 @@ -15,13 +15,13 @@ <h1 id=title>Selectors Level 4</h1> - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 20 June 2011</h2> + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 27 June 2011</h2> <dl> <dt>This version: - <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110620/"> - http://www.w3.org/TR/2011/PR-selectors4-20110620</a> --> + <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110627/"> + http://www.w3.org/TR/2011/PR-selectors4-20110627</a> --> <a href="http://dev.w3.org/csswg/selectors4"> http://dev.w3.org/csswg/selectors4</a> @@ -262,25 +262,31 @@ <li><a href="#nth-last-of-type-pseudo"><span class=secno>11.5. </span> :nth-last-of-type() pseudo-class</a> - <li><a href="#first-child-pseudo"><span class=secno>11.6. </span> + <li><a href="#nth-match"><span class=secno>11.6. </span> :nth-match() + pseudo-class</a> + + <li><a href="#nth-match"><span class=secno>11.7. </span> + :nth-last-match() pseudo-class</a> + + <li><a href="#first-child-pseudo"><span class=secno>11.8. </span> :first-child pseudo-class</a> - <li><a href="#last-child-pseudo"><span class=secno>11.7. </span> + <li><a href="#last-child-pseudo"><span class=secno>11.9. </span> :last-child pseudo-class</a> - <li><a href="#first-of-type-pseudo"><span class=secno>11.8. </span> + <li><a href="#first-of-type-pseudo"><span class=secno>11.10. </span> :first-of-type pseudo-class</a> - <li><a href="#last-of-type-pseudo"><span class=secno>11.9. </span> + <li><a href="#last-of-type-pseudo"><span class=secno>11.11. </span> :last-of-type pseudo-class</a> - <li><a href="#only-child-pseudo"><span class=secno>11.10. </span> + <li><a href="#only-child-pseudo"><span class=secno>11.12. </span> :only-child pseudo-class</a> - <li><a href="#only-of-type-pseudo"><span class=secno>11.11. </span> + <li><a href="#only-of-type-pseudo"><span class=secno>11.13. </span> :only-of-type pseudo-class</a> - <li><a href="#empty-pseudo"><span class=secno>11.12. </span> :empty + <li><a href="#empty-pseudo"><span class=secno>11.14. </span> :empty pseudo-class</a> </ul> @@ -2166,7 +2172,39 @@ <pre>body > h2:not(:first-of-type):not(:last-of-type)</pre> </div> - <h3 id=first-child-pseudo><span class=secno>11.6. </span> :first-child + <h3 id=nth-match><span class=secno>11.6. </span> :nth-match() pseudo-class</h3> + + <p><code>:nth-match(<a href="#selector"><var>selector</var></a>, + <var>a</var>n+<var>b</var>)</code> pseudo-class notation represents an + element that has a parent and has + <var>a</var><code>n</code>+<var>b</var>-1 siblings that match the given <a + href="#selector"><var>selector</var></a> <strong>before</strong> it in the + document tree, for any zero or positive integer value of <code>n</code>. + + <p>See <a href="#nth-child-pseudo"><code>:nth-child()</code></a> + pseudo-class for the syntax of its <var>a</var>n+<var>b</var> argument, + which can also be replaced with the ‘<code + class=css><code>even</code></code>’ and ‘<code + class=css><code>odd</code></code>’ keywords. + <!-- define <selector>. Split an+b into a similar <notation> --> + + <h3 id=nth-match><span class=secno>11.7. </span> :nth-last-match() + pseudo-class</h3> + + <p><code>:nth-match(<a href="#selector"><var>selector</var></a>, + <var>a</var>n+<var>b</var>)</code> pseudo-class notation represents an + element that has a parent and has + <var>a</var><code>n</code>+<var>b</var>-1 siblings that match the given <a + href="#selector"><var>selector</var></a> <strong>after</strong> it in the + document tree, for any zero or positive integer value of <code>n</code>. + + <p>See <a href="#nth-child-pseudo"><code>:nth-child()</code></a> + pseudo-class for the syntax of its <var>a</var>n+<var>b</var> argument, + which can also be replaced with the ‘<code + class=css><code>even</code></code>’ and ‘<code + class=css><code>odd</code></code>’ keywords. + + <h3 id=first-child-pseudo><span class=secno>11.8. </span> :first-child pseudo-class</h3> <p>Same as <code>:nth-child(1)</code>. The <code>:first-child</code> @@ -2201,7 +2239,7 @@ a:first-child /* Same (assuming a is not the root element) */</pre> </div> - <h3 id=last-child-pseudo><span class=secno>11.7. </span> :last-child + <h3 id=last-child-pseudo><span class=secno>11.9. </span> :last-child pseudo-class</h3> <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> @@ -2217,7 +2255,7 @@ <pre>ol > li:last-child</pre> </div> - <h3 id=first-of-type-pseudo><span class=secno>11.8. </span> :first-of-type + <h3 id=first-of-type-pseudo><span class=secno>11.10. </span> :first-of-type pseudo-class</h3> <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> @@ -2249,7 +2287,7 @@ </dl></pre> </div> - <h3 id=last-of-type-pseudo><span class=secno>11.9. </span> :last-of-type + <h3 id=last-of-type-pseudo><span class=secno>11.11. </span> :last-of-type pseudo-class</h3> <p>Same as <code>:nth-last-of-type(1)</code>. The @@ -2265,7 +2303,7 @@ <pre>tr > td:last-of-type</pre> </div> - <h3 id=only-child-pseudo><span class=secno>11.10. </span> :only-child + <h3 id=only-child-pseudo><span class=secno>11.12. </span> :only-child pseudo-class</h3> <p>Represents an element that has a parent element and whose parent element @@ -2274,7 +2312,7 @@ <code>:nth-child(1):nth-last-child(1)</code>, but with a lower specificity. - <h3 id=only-of-type-pseudo><span class=secno>11.11. </span> :only-of-type + <h3 id=only-of-type-pseudo><span class=secno>11.13. </span> :only-of-type pseudo-class</h3> <p>Represents an element that has a parent element and whose parent element @@ -2283,7 +2321,7 @@ <code>:nth-of-type(1):nth-last-of-type(1)</code>, but with a lower specificity. - <h3 id=empty-pseudo><span class=secno>11.12. </span> :empty pseudo-class</h3> + <h3 id=empty-pseudo><span class=secno>11.14. </span> :empty pseudo-class</h3> <p>The <code>:empty</code> pseudo-class represents an element that has no children at all. In terms of the document tree, only element nodes and Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/selectors4/Overview.src.html,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Overview.src.html 20 Jun 2011 17:33:55 -0000 1.14 +++ Overview.src.html 27 Jun 2011 22:45:14 -0000 1.15 @@ -1716,6 +1716,35 @@ <pre>body > h2:not(:first-of-type):not(:last-of-type)</pre> </div> +<h3 id=nth-match> +:nth-match() pseudo-class</h3> + + <p><code>:nth-match(<var>selector</var>, <var>a</var>n+<var>b</var>)</code> + pseudo-class notation represents an element that has a parent and has + <var>a</var><code>n</code>+<var>b</var>-1 siblings that match the + given <var>selector</var> <strong>before</strong> it in the document tree, + for any zero or positive integer value of <code>n</code>. + + <p>See <a href="#nth-child-pseudo"><code>:nth-child()</code></a> + pseudo-class for the syntax of its <var>a</var>n+<var>b</var> argument, + which can also be replaced with the '<code>even</code>' and '<code>odd</code>' + keywords. + + <!-- define <selector>. Split an+b into a similar <notation> --> + +<h3 id=nth-match> +:nth-last-match() pseudo-class</h3> + + <p><code>:nth-match(<var>selector</var>, <var>a</var>n+<var>b</var>)</code> + pseudo-class notation represents an element that has a parent and has + <var>a</var><code>n</code>+<var>b</var>-1 siblings that match the + given <var>selector</var> <strong>after</strong> it in the document tree, + for any zero or positive integer value of <code>n</code>. + + <p>See <a href="#nth-child-pseudo"><code>:nth-child()</code></a> + pseudo-class for the syntax of its <var>a</var>n+<var>b</var> argument, + which can also be replaced with the '<code>even</code>' and '<code>odd</code>' + keywords. <h3 id=first-child-pseudo> :first-child pseudo-class</h3>
Received on Monday, 27 June 2011 22:45:22 UTC