- From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 04 Jun 2011 03:04:41 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/selectors4 In directory hutz:/tmp/cvs-serv10786 Modified Files: Overview.html Overview.src.html Log Message: Add :dir() selector Index: Overview.html =================================================================== RCS file: /sources/public/csswg/selectors4/Overview.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Overview.html 28 Mar 2011 20:27:07 -0000 1.7 +++ Overview.html 4 Jun 2011 03:04:39 -0000 1.8 @@ -15,13 +15,13 @@ <h1 id=title>Selectors Level 4</h1> - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 28 March 2011</h2> + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 June 2011</h2> <dl> <dt>This version: - <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110328"> - http://www.w3.org/TR/2011/PR-selectors4-20110328</a> --> + <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110604/"> + http://www.w3.org/TR/2011/PR-selectors4-20110604</a> --> <a href="http://dev.w3.org/csswg/selectors4"> http://dev.w3.org/csswg/selectors4</a> @@ -221,8 +221,17 @@ target pseudo-class :target</a> </ul> - <li><a href="#lang-pseudo"><span class=secno>7.2. </span> The language - pseudo-class :lang</a> + <li><a href="#linguistic-pseudos"><span class=secno>7.2. </span> + Linguistic Pseudo-classes</a> + <ul class=toc> + <li><a href="#dir-pseudo"><span class=secno>7.2.1. </span> The + directionality pseudo-class :dir()</a> + + <li><a href="#x"><span class=secno>7.2.2. </span> </a> + + <li><a href="#lang-pseudo"><span class=secno>7.2.3. </span> The + language pseudo-class :lang</a> + </ul> <li><a href="#UIstates"><span class=secno>7.3. </span> The UI element states pseudo-classes </a> @@ -1771,8 +1780,49 @@ *:target::before { content : url(target.png) }</pre> </div> - <h3 id=lang-pseudo><span class=secno>7.2. </span> The language pseudo-class - :lang</h3> + <h3 id=linguistic-pseudos><span class=secno>7.2. </span> Linguistic + Pseudo-classes</h3> + + <h4 id=dir-pseudo><span class=secno>7.2.1. </span> The directionality + pseudo-class :dir()</h4> + + <h4 id=x><span class=secno>7.2.2. </span></h4> + + <p>The <code>:dir()</code> pseudo-class allows the author to write + selectors that represent an element based on its directionality. For + example, in HTML <a href="#HTML401" + rel=biblioentry>[HTML401]<!--{{HTML401}}--></a>, the directionality is + determined by the <code>dir</code> attribute. The <code>:dir()<code> + pseudo-class does not select based on stylistic states—for example, + the CSS 'direction' property does not affect whether it matches. + </code></code> + + <p>The pseudo-class <code>:dir(ltr)</code> represents an element that has a + directionality of left-to-right (<code>ltr</code>). The pseudo-class + <code>:dir(rtl)</code> represents an element that has a directionality of + right-to-left (<code>rtl</code>). The argument to <code>:dir()</code> must + be a single identifier, otherwise the selector is invlaid. White space is + optionally allowed between the identifier and the parentheses. Values + other than <code>ltr</code> and <code>rtl</code> are not invalid, but do + not match anything. (If a future markup spec defines other + directionalities, then Selectors may be extended to allow corresponding + values.) + + <p>The difference between <code>:dir(C)</code> and <code>[dir=C]</code> is + that <code>[dir=C]</code> only performs a comparison against a given + attribute on the element, while the <code>:dir(C)</code> pseudo-class uses + the UAs knowledge of the document's semantics to perform the comparison. + For example, in HTML, the directionality of an element inherits so that a + child without a <code>dir</code> attribute will have the same + directionality as its closest ancestor with a valid <code>dir</code> + attribute. As another example, in <a href="#HTML5" + rel=biblioentry>[HTML5]<!--{{HTML5}}--></a>, an element that matches + <code>[dir=auto]</code> will match either <code>:dir(ltr)</code> or + <code>:dir(rtl)</code> depending on the resolved directionality of the + elements as determined by its contents. + + <h4 id=lang-pseudo><span class=secno>7.2.3. </span> The language + pseudo-class :lang</h4> <p>If the document language specifies how the human language of an element is determined, it is possible to write selectors that represent an element @@ -2866,11 +2916,13 @@ <h2 id=acknowledgements><span class=secno>13. </span> Acknowledgements</h2> <p>The CSS working group would like to thank everyone who contributed to - the previous Selectors specifications over the years..</p> - <!-- + the <a href="http://www.w3.org/TR/css3-selectors">previous Selectors</a> + specifications over the years, as those specifications formed the basis + for this one. <!-- <p>In particular, the working group would like to extend special thanks to --> + <h2 id=references><span class=secno>14. </span> References</h2> @@ -2886,20 +2938,20 @@ <dt id=CSS21>[CSS21] <dd>Bert Bos; et al. <a - href="http://www.w3.org/TR/2010/WD-CSS2-20101207"><cite>Cascading Style - Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 December - 2010. W3C Working Draft. (Work in progress.) URL: <a - href="http://www.w3.org/TR/2010/WD-CSS2-20101207">http://www.w3.org/TR/2010/WD-CSS2-20101207</a> + href="http://www.w3.org/TR/2009/CR-CSS2-20090423"><cite>Cascading Style + Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 23 + April 2009. W3C Candidate Recommendation. (Work in progress.) URL: <a + href="http://www.w3.org/TR/2009/CR-CSS2-20090423">http://www.w3.org/TR/2009/CR-CSS2-20090423</a> </dd> <!----> <dt id=CSS3NAMESPACE>[CSS3NAMESPACE] - <dd>Anne van Kesteren; Elika J. Etemad. <a - href="http://www.w3.org/TR/2008/CR-css3-namespace-20080523"><cite>CSS + <dd>Elika J. Etemad; Anne van Kesteren. <a + href="http://www.w3.org/TR/2008/CR-css3-namespace-20080523/"><cite>CSS Namespaces Module.</cite></a> 23 May 2008. W3C Candidate Recommendation. (Work in progress.) URL: <a - href="http://www.w3.org/TR/2008/CR-css3-namespace-20080523">http://www.w3.org/TR/2008/CR-css3-namespace-20080523</a> + href="http://www.w3.org/TR/2008/CR-css3-namespace-20080523/">http://www.w3.org/TR/2008/CR-css3-namespace-20080523/</a> </dd> <!----> @@ -2959,10 +3011,10 @@ <dt id=CSS21>[CSS21] <dd>Bert Bos; et al. <a - href="http://www.w3.org/TR/2010/WD-CSS2-20101207"><cite>Cascading Style - Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 December - 2010. W3C Working Draft. (Work in progress.) URL: <a - href="http://www.w3.org/TR/2010/WD-CSS2-20101207">http://www.w3.org/TR/2010/WD-CSS2-20101207</a> + href="http://www.w3.org/TR/2009/CR-CSS2-20090423"><cite>Cascading Style + Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 23 + April 2009. W3C Candidate Recommendation. (Work in progress.) URL: <a + href="http://www.w3.org/TR/2009/CR-CSS2-20090423">http://www.w3.org/TR/2009/CR-CSS2-20090423</a> </dd> <!----> @@ -2978,13 +3030,22 @@ <dt id=HTML401>[HTML401] - <dd>David Raggett; Ian Jacobs; Arnaud Le Hors. <a + <dd>Dave Raggett; Arnaud Le Hors; Ian Jacobs. <a href="http://www.w3.org/TR/1999/REC-html401-19991224"><cite>HTML 4.01 Specification.</cite></a> 24 December 1999. W3C Recommendation. URL: <a href="http://www.w3.org/TR/1999/REC-html401-19991224">http://www.w3.org/TR/1999/REC-html401-19991224</a> </dd> <!----> + <dt id=HTML5>[HTML5] + + <dd>Ian Hickson. <a + href="http://www.w3.org/TR/2011/WD-html5-20110113"><cite>HTML5.</cite></a> + 13 January 2011. W3C Working Draft. (Work in progress.) URL: <a + href="http://www.w3.org/TR/2011/WD-html5-20110113">http://www.w3.org/TR/2011/WD-html5-20110113</a> + </dd> + <!----> + <dt id=MATHML>[MATHML] <dd>Patrick Ion; Robert Miner. <a @@ -3007,20 +3068,20 @@ <dt id=SVG11>[SVG11] <dd>Erik Dahlström; et al. <a - href="http://www.w3.org/TR/2010/WD-SVG11-20100622"><cite>Scalable Vector + href="http://www.w3.org/TR/2010/WD-SVG11-20100622/"><cite>Scalable Vector Graphics (SVG) 1.1 (Second Edition).</cite></a> 22 June 2010. W3C Working Draft. (Work in progress.) URL: <a - href="http://www.w3.org/TR/2010/WD-SVG11-20100622">http://www.w3.org/TR/2010/WD-SVG11-20100622</a> + href="http://www.w3.org/TR/2010/WD-SVG11-20100622/">http://www.w3.org/TR/2010/WD-SVG11-20100622/</a> </dd> <!----> <dt id=XML-NAMES>[XML-NAMES] <dd>Tim Bray; et al. <a - href="http://www.w3.org/TR/2009/REC-xml-names-20091208"><cite>Namespaces + href="http://www.w3.org/TR/2009/REC-xml-names-20091208/"><cite>Namespaces in XML 1.0 (Third Edition).</cite></a> 8 December 2009. W3C Recommendation. URL: <a - href="http://www.w3.org/TR/2009/REC-xml-names-20091208">http://www.w3.org/TR/2009/REC-xml-names-20091208</a> + href="http://www.w3.org/TR/2009/REC-xml-names-20091208/">http://www.w3.org/TR/2009/REC-xml-names-20091208/</a> </dd> <!----> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/selectors4/Overview.src.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Overview.src.html 4 Jun 2011 02:49:29 -0000 1.9 +++ Overview.src.html 4 Jun 2011 03:04:39 -0000 1.10 @@ -1339,8 +1339,44 @@ *:target::before { content : url(target.png) }</pre> </div> -<h3 id=lang-pseudo> -The language pseudo-class :lang</h3> +<h3 id="linguistic-pseudos"> +Linguistic Pseudo-classes</h3> + +<h4 id="dir-pseudo"> +The directionality pseudo-class :dir()<h4> + + <p>The <code>:dir()</code> pseudo-class allows the author to write + selectors that represent an element based on its directionality. + For example, in HTML [[HTML401]], the directionality is determined + by the <code>dir</code> attribute. The <code>:dir()<code> pseudo-class + does not select based on stylistic states—for example, the + CSS 'direction' property does not affect whether it matches. + + <p>The pseudo-class <code>:dir(ltr)</code> represents an element that + has a directionality of left-to-right (<code>ltr</code>). The + pseudo-class <code>:dir(rtl)</code> represents an element that has + a directionality of right-to-left (<code>rtl</code>). The argument to + <code>:dir()</code> must be a single identifier, otherwise the selector + is invlaid. White space is optionally allowed between the identifier + and the parentheses. Values other than <code>ltr</code> and + <code>rtl</code> are not invalid, but do not match anything. (If a + future markup spec defines other directionalities, then Selectors may + be extended to allow corresponding values.) + + <p>The difference between <code>:dir(C)</code> and <code>[dir=C]</code> + is that <code>[dir=C]</code> only performs a comparison against a given + attribute on the element, while the <code>:dir(C)</code> pseudo-class + uses the UAs knowledge of the document's semantics to perform the + comparison. For example, in HTML, the directionality of an element + inherits so that a child without a <code>dir</code> attribute will have + the same directionality as its closest ancestor with a valid <code>dir</code> + attribute. As another example, in [[HTML5]], an element that matches + <code>[dir=auto]</code> will match either <code>:dir(ltr)</code> or + <code>:dir(rtl)</code> depending on the resolved directionality of the + elements as determined by its contents.</p> + +<h4 id=lang-pseudo> +The language pseudo-class :lang</h4> <p>If the document language specifies how the human language of an element is determined, it is possible to write selectors that
Received on Saturday, 4 June 2011 03:04:44 UTC