Skip to content

Commit bcd3dc4

Browse files
committed
Add :current pseudo-class for <http://lists.w3.org/Archives/Public/www-style/2011Jun/0236.html>, link to HTML5's dir attribute section
1 parent 9d650df commit bcd3dc4

2 files changed

Lines changed: 63 additions & 12 deletions

File tree

selectors4/Overview.html

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515

1616
<h1 id=title>Selectors Level 4</h1>
1717

18-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 18 July 2011</h2>
18+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 21 July 2011</h2>
1919

2020
<dl>
2121
<dt>This version:
2222

23-
<dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110718/">
24-
http://www.w3.org/TR/2011/WD-selectors4-20110718</a> -->
23+
<dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110721/">
24+
http://www.w3.org/TR/2011/WD-selectors4-20110721</a> -->
2525
<a href="http://dev.w3.org/csswg/selectors4">
2626
http://dev.w3.org/csswg/selectors4</a>
2727

@@ -232,6 +232,9 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
232232

233233
<li><a href="#useraction-pseudos"><span class=secno>7.5. </span> The
234234
user action pseudo-classes :hover, :active, and :focus</a>
235+
236+
<li><a href="#current-pseudo"><span class=secno>7.6. </span> The
237+
currently-playing pseudo-class <code>:current</code></a>
235238
</ul>
236239

237240
<li><a href="#linguistic-pseudos"><span class=secno>8. </span> Linguistic
@@ -1919,6 +1922,29 @@ <h3 id=useraction-pseudos><span class=secno>7.5. </span> The user action
19191922
class=css>:link</code>&rsquo; and &lsquo;<code
19201923
class=css>:active</code>&rsquo;).
19211924

1925+
<h3 id=current-pseudo><span class=secno>7.6. </span> The currently-playing
1926+
pseudo-class <code>:current</code></h3>
1927+
1928+
<p>The <code>:current</code> pseudo-class represents the innermost element,
1929+
or ancestor of an element, that is currently being rendered in a
1930+
time-dimensional canvas, such as during speech rendering of a document.
1931+
Its alternate form <code>:current()</code>, like <code>:matches()</code>,
1932+
takes a list of compound selectors as its argument: it represents the
1933+
<code>:current</code> element that matches the argument or, if that does
1934+
not match, the innermost ancestor of the <code>:current</code> element
1935+
that does. (If neither the <code>:current</code> element nor its ancestors
1936+
match the argument, then the selector does not represent anything.)
1937+
1938+
<div class=example>
1939+
<p>For example, the following rule will highlight whichever paragraph or
1940+
list item is being read aloud in a speech rendering of the document:
1941+
1942+
<pre>
1943+
<!-- -->:current(p, li, dt, dd) {
1944+
<!-- --> background: yellow;
1945+
<!-- -->}</pre>
1946+
</div>
1947+
19221948
<h2 id=linguistic-pseudos><span class=secno>8. </span> Linguistic
19231949
Pseudo-classes</h2>
19241950

@@ -1953,11 +1979,12 @@ <h3 id=dir-pseudo><span class=secno>8.1. </span> The directionality
19531979
For example, in HTML, the directionality of an element inherits so that a
19541980
child without a <code>dir</code> attribute will have the same
19551981
directionality as its closest ancestor with a valid <code>dir</code>
1956-
attribute. As another example, in <a href="#HTML5"
1957-
rel=biblioentry>[HTML5]<!--{{HTML5}}--></a>, an element that matches
1958-
<code>[dir=auto]</code> will match either <code>:dir(ltr)</code> or
1959-
<code>:dir(rtl)</code> depending on the resolved directionality of the
1960-
elements as determined by its contents.
1982+
attribute. As another example, <a
1983+
href="http://www.w3.org/TR/html5/#the-directionality">in HTML5</a>, an
1984+
element that matches <code>[dir=auto]</code> will match either
1985+
<code>:dir(ltr)</code> or <code>:dir(rtl)</code> depending on the resolved
1986+
directionality of the elements as determined by its contents. <a
1987+
href="#HTML5" rel=biblioentry>[HTML5]<!--{{HTML5}}--></a>
19611988

19621989
<h3 id=lang-pseudo><span class=secno>8.2. </span> The language pseudo-class
19631990
<code>:lang</code></h3>

selectors4/Overview.src.html

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,29 @@ <h3 id=useraction-pseudos>
14321432
<p class="note"><strong>Note:</strong> An element can be both
14331433
':visited' and ':active' (or ':link' and ':active').</p>
14341434

1435+
<h3 id="current-pseudo">
1436+
The currently-playing pseudo-class <code>:current</code></h3>
1437+
1438+
<p>The <code>:current</code> pseudo-class represents the innermost
1439+
element, or ancestor of an element, that is currently being rendered
1440+
in a time-dimensional canvas, such as during speech rendering of a
1441+
document.
1442+
Its alternate form <code>:current()</code>, like <code>:matches()</code>,
1443+
takes a list of compound selectors as its argument: it represents the
1444+
<code>:current</code> element that matches the argument or, if that does
1445+
not match, the innermost ancestor of the <code>:current</code> element
1446+
that does. (If neither the <code>:current</code> element nor its ancestors
1447+
match the argument, then the selector does not represent anything.)
1448+
1449+
<div class="example">
1450+
<p>For example, the following rule will highlight whichever paragraph
1451+
or list item is being read aloud in a speech rendering of the document:
1452+
<pre>
1453+
<!-- -->:current(p, li, dt, dd) {
1454+
<!-- --> background: yellow;
1455+
<!-- -->}</pre>
1456+
</div>
1457+
14351458
<h2 id="linguistic-pseudos">
14361459
Linguistic Pseudo-classes</h2>
14371460

@@ -1465,10 +1488,11 @@ <h3 id="dir-pseudo">
14651488
comparison. For example, in HTML, the directionality of an element
14661489
inherits so that a child without a <code>dir</code> attribute will have
14671490
the same directionality as its closest ancestor with a valid <code>dir</code>
1468-
attribute. As another example, in [[HTML5]], an element that matches
1469-
<code>[dir=auto]</code> will match either <code>:dir(ltr)</code> or
1470-
<code>:dir(rtl)</code> depending on the resolved directionality of the
1471-
elements as determined by its contents.</p>
1491+
attribute. As another example,
1492+
<a href="http://www.w3.org/TR/html5/#the-directionality">in HTML5</a>,
1493+
an element that matches <code>[dir=auto]</code> will match either
1494+
<code>:dir(ltr)</code> or <code>:dir(rtl)</code> depending on the resolved
1495+
directionality of the elements as determined by its contents. [[HTML5]]
14721496

14731497
<h3 id=lang-pseudo>
14741498
The language pseudo-class <code>:lang</code></h3>

0 commit comments

Comments
 (0)