Skip to content

Commit 1447a08

Browse files
committed
1 parent 87c7e3b commit 1447a08

2 files changed

Lines changed: 66 additions & 38 deletions

File tree

selectors4/Overview.html

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919

2020
<h1 id=title>Selectors Level 4</h1>
2121

22-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 1 October 2011</h2>
22+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 10 October
23+
2011</h2>
2324

2425
<dl>
2526
<dt>This version: <!--
26-
<dd><a href="http://www.w3.org/TR/2011/ED-selectors4-20111001/">
27-
http://www.w3.org/TR/2011/WD-selectors4-20111001/</a>
27+
<dd><a href="http://www.w3.org/TR/2011/ED-selectors4-20111010/">
28+
http://www.w3.org/TR/2011/WD-selectors4-20111010/</a>
2829
2930
<dt>Editor's draft:
3031
-->
@@ -72,13 +73,13 @@ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 1 October 2011</h2>
7273
<p class=copyright><a
7374
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
7475
rel=license>Copyright</a> &copy; 2011 <a
75-
href="http://www.w3.org/"><acronym title="World Wide Web
76-
Consortium">W3C</acronym></a><sup>&reg;</sup> (<a
77-
href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute
78-
of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym
79-
title="European Research Consortium for Informatics and
80-
Mathematics">ERCIM</acronym></a>, <a
81-
href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
76+
href="http://www.w3.org/"><acronym
77+
title="World Wide Web Consortium">W3C</acronym></a><sup>&reg;</sup> (<a
78+
href="http://www.csail.mit.edu/"><acronym
79+
title="Massachusetts Institute of Technology">MIT</acronym></a>, <a
80+
href="http://www.ercim.eu/"><acronym
81+
title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
82+
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a
8283
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
8384
<a
8485
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
@@ -484,10 +485,10 @@ <h2 id=context><span class=secno>1. </span> Introduction</h2>
484485

485486
<p>These expressions can also be used, for instance, to select a set of
486487
elements, or a single element from a set of elements, by evaluating the
487-
expression across all the elements in a subtree. <abbr title="Simple Tree
488-
Transformation Sheets">STTS</abbr> (Simple Tree Transformation Sheets), a
489-
language for transforming XML trees, uses this mechanism. <a href="#STTS3"
490-
rel=biblioentry>[STTS3]<!--{{STTS3}}--></a>
488+
expression across all the elements in a subtree. <abbr
489+
title="Simple Tree Transformation Sheets">STTS</abbr> (Simple Tree
490+
Transformation Sheets), a language for transforming XML trees, uses this
491+
mechanism. <a href="#STTS3" rel=biblioentry>[STTS3]<!--{{STTS3}}--></a>
491492

492493
<p>Selectors Levels 1, 2, and 3 are defined as the subsets of selector
493494
functionality defined in the <a
@@ -1037,11 +1038,11 @@ <h2 id=overview><span class=secno>2. </span> Selectors Overview</h2>
10371038
<td>4
10381039

10391040
<tr>
1040-
<td><code>E:nth-match(<var>n</var> of <a
1041+
<td><code>E:nth-last-match(<var>n</var> of <a
10411042
href="#selector"><var>selector</var></a>)</code>
10421043

10431044
<td>an E element, the <var>n</var>-th sibling matching <a
1044-
href="#selector"><var>selector</var></a>
1045+
href="#selector"><var>selector</var></a>, counting from the last one
10451046

10461047
<td><a href="#structural-pseudos">Structural pseudo-classes</a>
10471048

@@ -1627,9 +1628,9 @@ <h3 id=universal-selector><span class=secno>5.2. </span> Universal selector
16271628
<p class=note><strong>Note:</strong> it is recommended that the
16281629
<code>*</code> not be omitted, because it decreases the potential
16291630
confusion between, for example, <code style="white-space: nowrap">div
1630-
:first-child</code> and <code style="white-space:
1631-
nowrap">div:first-child</code>. Here, <code style="white-space:
1632-
nowrap">div *:first-child</code> is more readable.
1631+
:first-child</code> and <code
1632+
style="white-space: nowrap">div:first-child</code>. Here, <code
1633+
style="white-space: nowrap">div *:first-child</code> is more readable.
16331634

16341635
<h4 id=univnmsp><span class=secno>5.2.1. </span> Universal selector and
16351636
namespaces</h4>
@@ -1668,6 +1669,10 @@ <h2 id=attribute-selectors><span class=secno>6. </span> Attribute selectors</h2>
16681669
attribute that matches the attribute represented by the attribute
16691670
selector.
16701671

1672+
<p class=issue>Add comma-separated syntax for <a
1673+
href="http://lists.w3.org/Archives/Public/www-style/2011Mar/0215.html">multiple-value
1674+
matching</a>? e.g. [rel ~= next, prev, up, first, last]
1675+
16711676
<h3 id=attribute-representation><span class=secno>6.1. </span> Attribute
16721677
presence and value selectors</h3>
16731678

@@ -1816,9 +1821,9 @@ <h3 id=attribute-case><span class=secno>6.3. </span> Case-sensitivity</h3>
18161821
<p>By default case-sensitivity of attribute names and values in selectors
18171822
depends on the document language. To match attribute values
18181823
case-insensitively regardless of document language rules, the attribute
1819-
selector may include the identifier <code>i</code> immediately inside the
1820-
closing bracket (<code>]</code>). When this flag is present, UAs must
1821-
match the attribute's value case-insensitively within the ASCII range.
1824+
selector may include the identifier <code>i</code> before the closing
1825+
bracket (<code>]</code>). When this flag is present, UAs must match the
1826+
attribute's value case-insensitively within the ASCII range.
18221827

18231828
<div class=example>
18241829
<p>The following rule will style the <code>frame</code> attribute when it
@@ -1830,6 +1835,10 @@ <h3 id=attribute-case><span class=secno>6.3. </span> Case-sensitivity</h3>
18301835
<!-- -->[frame=hsides i] { border-style: solid none; }
18311836
</pre>
18321837
</div>
1838+
<!-- plinss notes we may eventually want to choose other normalizations
1839+
for attribute matching; but since there's no normalization scheme
1840+
that really seems needed at this point, this issue is deferred to
1841+
a later level -->
18331842

18341843
<h3 id=attrnmsp><span class=secno>6.4. </span> Attribute selectors and
18351844
namespaces</h3>
@@ -2440,6 +2449,11 @@ <h3 id=lang-pseudo><span class=secno>10.2. </span> The language
24402449
within the ASCII range. The identifier C does not have to be a valid
24412450
language name.
24422451

2452+
<p class=issue>It's been <a
2453+
href="http://lists.w3.org/Archives/Public/www-international/2011OctDec/0000.html">proposed</a>
2454+
to allow :lang() to take a comma-separated list, as this will make an
2455+
easier syntax when multiple languages need to be selected against.
2456+
24432457
<p>C must be a valid CSS <a
24442458
href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifier</a>
24452459
<a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> and must not
@@ -3088,14 +3102,14 @@ <h3 id=nth-column-pseudo><span class=secno>13.2. </span> &lsquo;<code
30883102
<h3 id=nth-last-column-pseudo><span class=secno>13.3. </span> &lsquo;<code
30893103
class=css>:nth-last-column()</code>&rsquo; pseudo-class</h3>
30903104

3091-
<p>The <code>:nth-column(<var>a</var>n+<var>b</var>)</code> pseudo-class
3092-
notation represents a cell element belonging to a column that has
3093-
<var>a</var><code>n</code>+<var>b</var>-1 columns <strong>after</strong>
3094-
it, for any positive integer or zero value of <code>n</code>. Column
3095-
membership is determined based on the semantics of the document language
3096-
only: whether and how the elements are presented is not considered. If a
3097-
cell element belongs to more than one column, it is represented by a
3098-
selector indicating any of those columns.
3105+
<p>The <code>:nth-last-column(<var>a</var>n+<var>b</var>)</code>
3106+
pseudo-class notation represents a cell element belonging to a column that
3107+
has <var>a</var><code>n</code>+<var>b</var>-1 columns
3108+
<strong>after</strong> it, for any positive integer or zero value of
3109+
<code>n</code>. Column membership is determined based on the semantics of
3110+
the document language only: whether and how the elements are presented is
3111+
not considered. If a cell element belongs to more than one column, it is
3112+
represented by a selector indicating any of those columns.
30993113

31003114
<p>See <a href="#nth-child-pseudo"><code>:nth-child()</code></a>
31013115
pseudo-class for the syntax of its argument. It also accepts the
@@ -3385,7 +3399,7 @@ <h3 id=grammar><span class=secno>16.1. </span> Grammar</h3>
33853399
SUBSTRINGMATCH |
33863400
'=' |
33873401
INCLUDES |
3388-
DASHMATCH ] S* [ IDENT | STRING ] S*
3402+
DASHMATCH ] S* [ IDENT | STRING ] S* [IDENT S*]?
33893403
]? ']'
33903404
;
33913405

@@ -3657,8 +3671,8 @@ <h3 id=conformance-classes><span class=secno>18.2. </span> Conformance
36573671
classes:
36583672

36593673
<dl>
3660-
<dt><dfn id=selector-instance title="selector instance!!as conformance
3661-
class">selector instance</dfn>
3674+
<dt><dfn id=selector-instance
3675+
title="selector instance!!as conformance class">selector instance</dfn>
36623676

36633677
<dd>A written selector.
36643678

selectors4/Overview.src.html

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,9 @@ <h2 id=overview>
441441
<td><a href="#structural-pseudos">Structural pseudo-classes</a>
442442
<td>4
443443
<tr>
444-
<td><code>E:nth-match(<var>n</var> of <var>selector</var>)</code>
445-
<td>an E element, the <var>n</var>-th sibling matching <var>selector</var>
444+
<td><code>E:nth-last-match(<var>n</var> of <var>selector</var>)</code>
445+
<td>an E element, the <var>n</var>-th sibling matching <var>selector</var>,
446+
counting from the last one
446447
<td><a href="#structural-pseudos">Structural pseudo-classes</a>
447448
<td>4
448449
<tbody>
@@ -993,6 +994,10 @@ <h2 id=attribute-selectors>
993994
element has an attribute that matches the attribute represented by the
994995
attribute selector.</p>
995996

997+
<p class="issue">Add comma-separated syntax for
998+
<a href="http://lists.w3.org/Archives/Public/www-style/2011Mar/0215.html">multiple-value matching</a>?
999+
e.g. [rel ~= next, prev, up, first, last]
1000+
9961001
<h3 id=attribute-representation>
9971002
Attribute presence and value selectors</h3>
9981003

@@ -1124,7 +1129,7 @@ <h3 id=attribute-case>
11241129
<p>By default case-sensitivity of attribute names and values in selectors
11251130
depends on the document language. To match attribute values case-insensitively
11261131
regardless of document language rules, the attribute selector may include the
1127-
identifier <code>i</code> immediately inside the closing bracket (<code>]</code>).
1132+
identifier <code>i</code> before the closing bracket (<code>]</code>).
11281133
When this flag is present, UAs must match the attribute's value
11291134
case-insensitively within the ASCII range.
11301135

@@ -1138,6 +1143,11 @@ <h3 id=attribute-case>
11381143
</pre>
11391144
</div>
11401145

1146+
<!-- plinss notes we may eventually want to choose other normalizations
1147+
for attribute matching; but since there's no normalization scheme
1148+
that really seems needed at this point, this issue is deferred to
1149+
a later level -->
1150+
11411151
<h3 id=attrnmsp>
11421152
Attribute selectors and namespaces</h3>
11431153

@@ -1708,6 +1718,10 @@ <h3 id=lang-pseudo>
17081718
element's language value is performed case-insensitively within the ASCII range.
17091719
The identifier C does not have to be a valid language name.</p>
17101720

1721+
<p class="issue">It's been <a href="http://lists.w3.org/Archives/Public/www-international/2011OctDec/0000.html">proposed</a>
1722+
to allow :lang() to take a comma-separated list, as this will make
1723+
an easier syntax when multiple languages need to be selected against.
1724+
17111725
<p>C must be a valid CSS <a href="http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier">identifier</a> [[!CSS21]]
17121726
and must not be empty. (Otherwise, the selector is invalid.)</p>
17131727

@@ -2304,7 +2318,7 @@ <h3 id="nth-column-pseudo">
23042318
<h3 id="nth-last-column-pseudo">
23052319
'':nth-last-column()'' pseudo-class</h3>
23062320

2307-
<p>The <code>:nth-column(<var>a</var>n+<var>b</var>)</code>
2321+
<p>The <code>:nth-last-column(<var>a</var>n+<var>b</var>)</code>
23082322
pseudo-class notation represents a cell element belonging to a column
23092323
that has <var>a</var><code>n</code>+<var>b</var>-1 columns
23102324
<strong>after</strong> it, for any positive
@@ -2574,7 +2588,7 @@ <h3 id=grammar>
25742588
SUBSTRINGMATCH |
25752589
'=' |
25762590
INCLUDES |
2577-
DASHMATCH ] S* [ IDENT | STRING ] S*
2591+
DASHMATCH ] S* [ IDENT | STRING ] S* [IDENT S*]?
25782592
]? ']'
25792593
;
25802594

0 commit comments

Comments
 (0)