- From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 04 Nov 2011 04:36:37 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/selectors4 In directory hutz:/tmp/cvs-serv7850 Modified Files: Overview.html Overview.src.html Log Message: Add comma-separated args to :lang() <http://lists.w3.org/Archives/Public/www-international/2011OctDec/0000.html> Index: Overview.html =================================================================== RCS file: /sources/public/csswg/selectors4/Overview.html,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- Overview.html 10 Oct 2011 21:06:24 -0000 1.60 +++ Overview.html 4 Nov 2011 04:36:35 -0000 1.61 @@ -3,7 +3,7 @@ <html lang=en> <head> <title>Selectors Level 4</title> - <link href=default.css rel=stylesheet type="text/css"> + <link href="../css-module/default.css" rel=stylesheet type="text/css"> <style type="text/css"> .tprofile td, th { vertical-align: baseline; padding: 0 0.5em; } @@ -19,13 +19,13 @@ <h1 id=title>Selectors Level 4</h1> - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 10 October + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 November 2011</h2> <dl> <dt>This version: <!-- - <dd><a href="http://www.w3.org/TR/2011/ED-selectors4-20111010/"> - http://www.w3.org/TR/2011/WD-selectors4-20111010/</a> + <dd><a href="http://www.w3.org/TR/2011/ED-selectors4-20111104/"> + http://www.w3.org/TR/2011/WD-selectors4-20111104/</a> <dt>Editor's draft: --> @@ -301,7 +301,7 @@ class=css>:dir()</code>’</a> <li><a href="#lang-pseudo"><span class=secno>10.2. </span> The language - pseudo-class ‘<code class=css>:lang</code>’</a> + pseudo-class ‘<code class=css>:lang()</code>’</a> </ul> <li><a href="#ui-states-pseudos"><span class=secno>11. </span> The UI @@ -558,15 +558,6 @@ <tbody> <tr> - <td><code>E:not(<var>s</var>)</code> - - <td>an E element that does not match simple selector <var>s</var> - - <td><a href="#negation">Negation pseudo-class</a> - - <td>3 - - <tr> <td><code>E:not(<var>s1</var>, <var>s2</var>)</code> <td>an E element that does not match either compound selector @@ -574,7 +565,7 @@ <td><a href="#negation">Negation pseudo-class</a> - <td>4 + <td>3/4 <tr> <td><code>E:matches(<var>s1</var>, <var>s2</var>)</code> @@ -698,14 +689,14 @@ <td>2 <tr> - <td><code>E:lang(fr)</code> + <td><code>E:lang(fr, en)</code> - <td>an element of type E in language "fr" (the document language - specifies how language is determined) + <td>an element of type E in either language "fr" or language "en" (the + document language specifies how language is determined) <td><a href="#lang-pseudo">The :lang() pseudo-class</a> - <td>2 + <td>2/4 <tbody> <tr> @@ -1456,6 +1447,9 @@ <code>:matches()</code>: <code>:not(:not(...))</code> and <code>:matches(:not(...))</code> are invalid. + <p class=note>In Selectors Level 3, only a single <a href="#simple">simple + selector</a> was allowed as the argument to <code>:not()</code>. + <p>Pseudo-elements cannot be represented by the negation pseudo-class; they are not valid within <code>:not()</code>. @@ -2428,36 +2422,34 @@ href="#HTML5" rel=biblioentry>[HTML5]<!--{{HTML5}}--></a> <h3 id=lang-pseudo><span class=secno>10.2. </span> The language - pseudo-class ‘<code class=css>:lang</code>’</h3> + pseudo-class ‘<code class=css>:lang()</code>’</h3> <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 - based on its language. For example, in HTML <a href="#HTML401" - rel=biblioentry>[HTML401]<!--{{HTML401}}--></a>, the language is - determined by a combination of the <code>lang</code> attribute and - possibly information from the <code>meta</code> elements or the protocol - (such as HTTP headers). XML uses an attribute called - <code>xml:lang</code>, and there may be other document language-specific - methods for determining the language. - - <p>The pseudo-class <code>:lang(C)</code> represents an element that is in - language C. Whether an element is represented by a <code>:lang()</code> - selector is based solely on the element's language value (normalized to - BCP 47 syntax if necessary) being equal to the identifier C, or beginning - with the identifier C immediately followed by "-" (U+002D). The matching - of C against the element's language value is performed case-insensitively - within the ASCII range. The identifier C does not have to be a valid - language name. + based on its language. The <code>:lang()</code> pseudo-class represents an + element that is in one of the languages listed in its argument. It accepts + a comma-separated list of one or more language identifiers as its + argument. Each language identifier in <code>:lang()</code> must be a valid + CSS <a + href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifier</a> + for the selector to be valid. <a href="#CSS21" + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> - <p class=issue>It's been <a - href="http://lists.w3.org/Archives/Public/www-international/2011OctDec/0000.html">proposed</a> - to allow :lang() to take a comma-separated list, as this will make an - easier syntax when multiple languages need to be selected against. + <p>The language of an element is defined by the document language. For + example, in HTML <a href="#HTML401" + rel=biblioentry>[HTML401]<!--{{HTML401}}--></a>, the language is + determined by a combination of the <code>lang</code> attribute, + information from <code>meta</code> elements, and possibly also the + protocol (e.g. from HTTP headers). XML languages can use the + <code>xml:lang</code> attribute to indicate language information for an + element. - <p>C must be a valid CSS <a - href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifier</a> - <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> and must not - be empty. (Otherwise, the selector is invalid.) + <p>The element's language matches a language identifier if the element's + language value (normalized to BCP 47 syntax if necessary) either is equal + to the language identifier or begins with the identifier and is + immediately followed by "-" (U+002D). The matching is performed + case-insensitively within the ASCII range. The language identifier does + not need to be a valid language code to perform this comparison. <p class=note><strong>Note:</strong> It is recommended that documents and protocols indicate language using codes from BCP 47 <a href="#BCP47" @@ -2480,8 +2472,8 @@ :lang(de) > q</pre> </div> - <p>The difference between <code>:lang(C)</code> and the ‘<code - class=css>|=</code>’ operator is that the ‘<code + <p class=note>One difference between <code>:lang(C)</code> and the + ‘<code class=css>|=</code>’ operator is that the ‘<code class=css>|=</code>’ operator only performs a comparison against a given attribute on the element, while the <code>:lang(C)</code> pseudo-class uses the UAs knowledge of the document's semantics to perform @@ -3766,20 +3758,20 @@ <dt id=CSS21>[CSS21] <dd>Bert Bos; et al. <a - href="http://www.w3.org/TR/2011/REC-CSS2-20110607/"><cite>Cascading Style + href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June 2011. W3C Recommendation. URL: <a - href="http://www.w3.org/TR/2011/REC-CSS2-20110607/">http://www.w3.org/TR/2011/REC-CSS2-20110607/</a> + href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a> </dd> <!----> <dt id=CSS3NAMESPACE>[CSS3NAMESPACE] <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/2011/REC-css3-namespace-20110929/"><cite>CSS + Namespaces Module.</cite></a> 29 September 2011. W3C Recommendation. URL: + <a + href="http://www.w3.org/TR/2011/REC-css3-namespace-20110929/">http://www.w3.org/TR/2011/REC-css3-namespace-20110929/</a> </dd> <!----> @@ -3801,10 +3793,9 @@ <dt id=SELECT>[SELECT] <dd>Tantek Çelik; et al. <a - href="http://www.w3.org/TR/2009/PR-css3-selectors-20091215"><cite>Selectors - Level 3.</cite></a> 15 December 2009. W3C Proposed Recommendation. (Work - in progress.) URL: <a - href="http://www.w3.org/TR/2009/PR-css3-selectors-20091215">http://www.w3.org/TR/2009/PR-css3-selectors-20091215</a> + href="http://www.w3.org/TR/2011/REC-css3-selectors-20110929/"><cite>Selectors + Level 3.</cite></a> 29 September 2011. W3C Recommendation. URL: <a + href="http://www.w3.org/TR/2011/REC-css3-selectors-20110929/">http://www.w3.org/TR/2011/REC-css3-selectors-20110929/</a> </dd> <!----> @@ -3916,10 +3907,10 @@ <dt id=SVG11>[SVG11] <dd>Erik Dahlström; et al. <a - href="http://www.w3.org/TR/2011/PR-SVG11-20110609/"><cite>Scalable Vector - Graphics (SVG) 1.1 (Second Edition).</cite></a> 9 June 2011. W3C Proposed - Recommendation. (Work in progress.) URL: <a - href="http://www.w3.org/TR/2011/PR-SVG11-20110609/">http://www.w3.org/TR/2011/PR-SVG11-20110609/</a> + href="http://www.w3.org/TR/2011/REC-SVG11-20110816/"><cite>Scalable + Vector Graphics (SVG) 1.1 (Second Edition).</cite></a> 16 August 2011. + W3C Recommendation. URL: <a + href="http://www.w3.org/TR/2011/REC-SVG11-20110816/">http://www.w3.org/TR/2011/REC-SVG11-20110816/</a> </dd> <!----> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/selectors4/Overview.src.html,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- Overview.src.html 10 Oct 2011 21:06:24 -0000 1.62 +++ Overview.src.html 4 Nov 2011 04:36:35 -0000 1.63 @@ -2,7 +2,7 @@ <html lang="en"> <head> <title>Selectors Level 4</title> - <link href="default.css" type="text/css" rel="stylesheet"> + <link href="../css-module/default.css" type="text/css" rel="stylesheet"> <style type="text/css"> .tprofile td, th { vertical-align: baseline; padding: 0 0.5em; } .tprofile th { text-align: right; } @@ -167,16 +167,11 @@ <td>1 <tbody> <tr> - <td><code>E:not(<var>s</var>)</code> - <td>an E element that does not match simple selector <var>s</var> - <td><a href="#negation">Negation pseudo-class</a> - <td>3 - <tr> <td><code>E:not(<var>s1</var>, <var>s2</var>)</code> <td>an E element that does not match either compound selector <var>s1</var> or compound selector <var>s2</var> <td><a href="#negation">Negation pseudo-class</a> - <td>4 + <td>3/4 <tr> <td><code>E:matches(<var>s1</var>, <var>s2</var>)</code> <td>an E element that matches compound selector <var>s1</var> @@ -251,11 +246,11 @@ <td><a href="#dir-pseudo">The :dir() pseudo-class</a> <td>2 <tr> - <td><code>E:lang(fr)</code> - <td>an element of type E in language "fr" (the document - language specifies how language is determined) + <td><code>E:lang(fr, en)</code> + <td>an element of type E in either language "fr" or language "en" + (the document language specifies how language is determined) <td><a href="#lang-pseudo">The :lang() pseudo-class</a> - <td>2 + <td>2/4 <tbody> <tr> <td><code>E:any-link</code> @@ -801,6 +796,10 @@ negations may not be nested within itself or within <code>:matches()</code>: <code>:not(:not(...))</code> and <code>:matches(:not(...))</code> are invalid. + <p class="note">In Selectors Level 3, only a single + <a href="#simple">simple selector</a> was allowed as the argument to + <code>:not()</code>. + <p>Pseudo-elements cannot be represented by the negation pseudo-class; they are not valid within <code>:not()</code>. @@ -1698,32 +1697,32 @@ directionality of the elements as determined by its contents. [[HTML5]] <h3 id=lang-pseudo> -The language pseudo-class '':lang''</h3> +The language pseudo-class '':lang()''</h3> <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 based on its language. For example, in HTML [[HTML401]], the language is determined by a - combination of the <code>lang</code> attribute and possibly - information from the <code>meta</code> elements or the protocol (such - as HTTP headers). XML uses an attribute called <code>xml:lang</code>, - and there may be other document language-specific methods for - determining the language.</p> - - <p>The pseudo-class <code>:lang(C)</code> represents an element that - is in language C. Whether an element is represented by a - <code>:lang()</code> selector is based solely on the element's - language value (normalized to BCP 47 syntax if necessary) being - equal to the identifier C, or beginning with the identifier C - immediately followed by "-" (U+002D). The matching of C against the - element's language value is performed case-insensitively within the ASCII range. - The identifier C does not have to be a valid language name.</p> + represent an element based on its language. + The <code>:lang()</code> pseudo-class represents an element that + is in one of the languages listed in its argument. It accepts + a comma-separated list of one or more language identifiers as its + argument. Each language identifier in <code>:lang()</code> must be + a valid CSS <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifier</a> + for the selector to be valid. [[!CSS21]] - <p class="issue">It's been <a href="http://lists.w3.org/Archives/Public/www-international/2011OctDec/0000.html">proposed</a> - to allow :lang() to take a comma-separated list, as this will make - an easier syntax when multiple languages need to be selected against. + <p>The language of an element is defined by the document language. + For example, in HTML [[HTML401]], the language is determined by a + combination of the <code>lang</code> attribute, information from + <code>meta</code> elements, and possibly also the protocol (e.g. + from HTTP headers). XML languages can use the <code>xml:lang</code> + attribute to indicate language information for an element. - <p>C must be a valid CSS <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifier</a> [[!CSS21]] - and must not be empty. (Otherwise, the selector is invalid.)</p> + <p>The element's language matches a language identifier if the element's + language value (normalized to BCP 47 syntax if necessary) either is equal + to the language identifier or begins with the identifier and is + immediately followed by "-" (U+002D). + The matching is performed case-insensitively within the ASCII range. + The language identifier does not need to be a valid language code to + perform this comparison.</p> <p class="note"><strong>Note:</strong> It is recommended that documents and protocols indicate language using codes from BCP 47 [[BCP47]] or its successor, and by means of @@ -1743,7 +1742,7 @@ :lang(de) > q</pre> </div> - <p>The difference between <code>:lang(C)</code> and the '|=' operator + <p class="note">One difference between <code>:lang(C)</code> and the '|=' operator is that the '|=' operator only performs a comparison against a given attribute on the element, while the <code>:lang(C)</code> pseudo-class uses the UAs knowledge of the document's semantics to perform the
Received on Friday, 4 November 2011 04:38:41 UTC