- From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 06 Aug 2011 18:06:37 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/selectors4
In directory hutz:/tmp/cvs-serv16089
Modified Files:
Overview.html Overview.src.html
Log Message:
Add section on pseudo-elements back in
Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/selectors4/Overview.html,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- Overview.html 4 Aug 2011 16:53:24 -0000 1.42
+++ Overview.html 6 Aug 2011 18:06:35 -0000 1.43
@@ -15,13 +15,13 @@
<h1 id=title>Selectors Level 4</h1>
- <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 August 2011</h2>
+ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 6 August 2011</h2>
<dl>
<dt>This version:
- <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110804/">
- http://www.w3.org/TR/2011/WD-selectors4-20110804</a> -->
+ <dd> <!-- <a href="http://www.w3.org/TR/2011/ED-selectors4-20110806/">
+ http://www.w3.org/TR/2011/WD-selectors4-20110806</a> -->
<a href="http://dev.w3.org/csswg/selectors4">
http://dev.w3.org/csswg/selectors4</a>
@@ -153,12 +153,15 @@
<li><a href="#pseudo-classes"><span class=secno>3.3. </span>
Pseudo-classes</a>
- <li><a href="#case-sensitive"><span class=secno>3.4. </span> Characters
+ <li><a href="#pseudo-elements"><span class=secno>3.4.
+ </span>Pseudo-elements</a>
+
+ <li><a href="#case-sensitive"><span class=secno>3.5. </span> Characters
and case sensitivity</a>
- <li><a href="#namespaces"><span class=secno>3.5. </span> Namespaces</a>
+ <li><a href="#namespaces"><span class=secno>3.6. </span> Namespaces</a>
- <li><a href="#invalid"><span class=secno>3.6. </span> Invalid Selectors
+ <li><a href="#invalid"><span class=secno>3.7. </span> Invalid Selectors
and Error Handling</a>
</ul>
@@ -433,8 +436,9 @@
<p>Pseudo-element selectors, which define abstract elements in a rendering
tree, are not part of this specification: their generic syntax is
- described here, but they are defined in a separate Pseudo-Element
- Selectors Level 4 module.
+ described here, but, due to their close integration with the rendering
+ model and irrelevance to other uses such as DOM queries, they will be
+ defined in other modules.
<h3 id=conventions><span class=secno>1.2. </span>Document Conventions</h3>
@@ -948,7 +952,54 @@
<p>Dynamic pseudo-classes do not appear in the document source or document
tree.
- <h3 id=case-sensitive><span class=secno>3.4. </span> Characters and case
+ <h3 id=pseudo-elements><span class=secno>3.4. </span>Pseudo-elements</h3>
+
+ <p>Pseudo-elements create abstractions about the document tree beyond those
+ specified by the document language. For instance, document languages do
+ not offer mechanisms to access the first letter or first line of an
+ element's content. Pseudo-elements allow authors to refer to this
+ otherwise inaccessible information. Pseudo-elements may also provide
+ authors a way to refer to content that does not exist in the source
+ document (e.g., the <code>::before</code> and <code>::after</code>
+ pseudo-elements give access to generated content in CSS <a href="#CSS21"
+ rel=biblioentry>[CSS21]<!--{{CSS21}}--></a>).
+
+ <p>A pseudo-element is made of two colons (<code>::</code>) followed by the
+ name of the pseudo-element.
+
+ <p>This <code>::</code> notation was chosen in order to establish a
+ discrimination between pseudo-classes (which subclass existing elements)
+ and pseudo-elements (which are elements not represented in the document
+ tree). However, for compatibility with existing style sheets, user agents
+ must also accept the previous one-colon notation for pseudo-elements
+ introduced in CSS levels 1 and 2 (namely, <code>:first-line</code>,
+ <code>:first-letter</code>, <code>:before</code> and <code>:after</code>).
+ This compatibility notation is not allowed any other pseudo-elements.
+
+ <p>Only one pseudo-element may appear per selector, and only if the subject
+ of the selector is the last compound selector in the selector. If present
+ the pseudo-element must appear after the compound selector that represents
+ the <a href="#subject">subjects</a> of the selector.
+
+ <p class=note>A future version of this specification may allow multiple
+ pseudo-elements per selector.
+
+ <p>Syntactically, a pseudo-element may be followed by any combination of
+ the <a href="#useraction-pseudos">user action pseudo-classes</a>. Whether
+ these pseudo-classes can match on the pseudo-element depends on the
+ pseudo-class and pseudo-element's definition: unless otherwise-specified,
+ none of these pseudo-classes will match on the pseudo-element.
+
+ <div class=example>
+ <p>For example, the <code>:hover</code> pseudo-class specifies that it can
+ apply to any pseudo-element, i.e. <code>::first-line:hover</code> will
+ match when the first line is hovered. However, since neither
+ <code>:focus</code> nor <code>::first-line</code> define that
+ <code>:focus</code> can apply to <code>::first-line</code>, the selector
+ <code>::first-line:focus</code> will never match anything.
+ </div>
+
+ <h3 id=case-sensitive><span class=secno>3.5. </span> Characters and case
sensitivity</h3>
<p>All Selectors syntax is case-insensitive within the ASCII range (i.e.
@@ -971,7 +1022,7 @@
rules</a> as CSS. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>.
- <h3 id=namespaces><span class=secno>3.5. </span> Namespaces</h3>
+ <h3 id=namespaces><span class=secno>3.6. </span> Namespaces</h3>
<p>Certain selectors support namespace prefixes. The mechanism by which
namespace prefixes are <dfn id=declared>declared</dfn> should be specified
@@ -982,7 +1033,7 @@
rule. <a href="#CSS3NAMESPACE"
rel=biblioentry>[CSS3NAMESPACE]<!--{{!CSS3NAMESPACE}}--></a>
- <h3 id=invalid><span class=secno>3.6. </span> Invalid Selectors and Error
+ <h3 id=invalid><span class=secno>3.7. </span> Invalid Selectors and Error
Handling</h3>
<p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a
@@ -1948,6 +1999,8 @@
‘<code class=css>:hover</code>’ to apply to an element that is
not underneath the pointing device.
+ <p>The <code>:hover</code> pseudo-class can apply to any pseudo-element.
+
<h3 id=active-pseudo><span class=secno>8.2. </span> The activation
pseudo-class :active</h3>
Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/selectors4/Overview.src.html,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- Overview.src.html 4 Aug 2011 16:53:24 -0000 1.44
+++ Overview.src.html 6 Aug 2011 18:06:35 -0000 1.45
@@ -106,8 +106,9 @@
<p>Pseudo-element selectors, which define abstract elements in a
rendering tree, are not part of this specification: their generic syntax
- is described here, but they are defined in a separate Pseudo-Element
- Selectors Level 4 module.
+ is described here, but, due to their close integration with the rendering
+ model and irrelevance to other uses such as DOM queries, they will be
+ defined in other modules.
<h3 id="conventions">Document Conventions</h3>
@@ -516,6 +517,54 @@
<p>Dynamic pseudo-classes do not appear in the document source or
document tree.</p>
+<h3 id=pseudo-elements>Pseudo-elements</h3>
+
+ <p>Pseudo-elements create abstractions about the document tree beyond
+ those specified by the document language. For instance, document
+ languages do not offer mechanisms to access the first letter or first
+ line of an element's content. Pseudo-elements allow authors to refer
+ to this otherwise inaccessible information. Pseudo-elements may also
+ provide authors a way to refer to content that does not exist in the
+ source document (e.g., the <code>::before</code> and
+ <code>::after</code> pseudo-elements give access to generated
+ content in CSS [[CSS21]]).</p>
+
+ <p>A pseudo-element is made of two colons (<code>::</code>) followed
+ by the name of the pseudo-element.</p>
+
+ <p>This <code>::</code> notation was chosen in order to establish a
+ discrimination between pseudo-classes (which subclass existing elements)
+ and pseudo-elements (which are elements not represented in the document
+ tree). However, for compatibility with existing style sheets, user
+ agents must also accept the previous one-colon notation for
+ pseudo-elements introduced in CSS levels 1 and 2 (namely,
+ <code>:first-line</code>, <code>:first-letter</code>,
+ <code>:before</code> and <code>:after</code>). This compatibility
+ notation is not allowed any other pseudo-elements.</p>
+
+ <p>Only one pseudo-element may appear per selector, and only if the
+ subject of the selector is the last compound selector in the selector.
+ If present the pseudo-element must appear after the compound selector
+ that represents the <a href="#subject">subjects</a> of the selector.
+
+ <p class="note">A future version of this specification may allow
+ multiple pseudo-elements per selector.</p>
+
+ <p>Syntactically, a pseudo-element may be followed by any combination
+ of the <a href="#useraction-pseudos">user action pseudo-classes</a>.
+ Whether these pseudo-classes can match on the pseudo-element depends
+ on the pseudo-class and pseudo-element's definition: unless
+ otherwise-specified, none of these pseudo-classes will match on the
+ pseudo-element.
+
+ <div class="example">
+ <p>For example, the <code>:hover</code> pseudo-class specifies that it
+ can apply to any pseudo-element, i.e. <code>::first-line:hover</code>
+ will match when the first line is hovered.
+ However, since neither <code>:focus</code> nor <code>::first-line</code>
+ define that <code>:focus</code> can apply to <code>::first-line</code>,
+ the selector <code>::first-line:focus</code> will never match anything.
+ </div>
<h3 id=case-sensitive>
Characters and case sensitivity</h3>
@@ -1430,6 +1479,7 @@
possible for ':hover' to apply to an element that is not underneath
the pointing device.</p>
+ <p>The <code>:hover</code> pseudo-class can apply to any pseudo-element.
<h3 id="active-pseudo">
The activation pseudo-class :active</h3>
Received on Saturday, 6 August 2011 18:06:39 UTC