| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../htmlrunner.js"></script> | 3 <script src="../htmlrunner.js"></script> |
| 4 <script src="../lib/ext-base.js"></script> | |
| 5 <script src="../lib/ext-core.js"></script> | 4 <script src="../lib/ext-core.js"></script> |
| 6 <script> | 5 <script> |
| 7 window.onload = function(){ | 6 window.onload = function(){ |
| 8 startTest("cssquery-ext", '559e157b'); | 7 startTest("cssquery-ext", '5bc05a17'); |
| 9 | 8 |
| 10 // Try to force real results | 9 // Try to force real results |
| 11 var ret, tmp; | 10 var ret, tmp; |
| 12 | 11 |
| 13 var html = document.body.innerHTML; | 12 var html = document.body.innerHTML; |
| 14 var query = Ext.DomQuery.select; | 13 var query = Ext.DomQuery.select; |
| 15 | 14 |
| 16 prep(function(){ | 15 prep(function(){ |
| 17 var div = document.createElement("div"); | 16 var div = document.createElement("div"); |
| 18 div.innerHTML = html; | 17 div.innerHTML = html; |
| 19 document.body.appendChild( div ); | 18 document.body.appendChild( div ); |
| 20 }); | 19 }); |
| 21 » | 20 |
| 22 test("Ext - *", function(){ | 21 test("Ext - *", function(){ |
| 23 query("*"); | 22 query("*"); |
| 24 }); | 23 }); |
| 25 | 24 |
| 26 test("Ext - div:only-child", function(){ | 25 test("Ext - div:only-child", function(){ |
| 27 query("div:only-child"); | 26 query("div:only-child"); |
| 28 }); | 27 }); |
| 29 | 28 |
| 30 test("Ext - div:first-child", function(){ | 29 test("Ext - div:first-child", function(){ |
| 31 query("div:first-child"); | 30 query("div:first-child"); |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 specification, these have been described in terms of CSS2.1. <a | 411 specification, these have been described in terms of CSS2.1. <a |
| 413 href="#refsCSS21">[CSS21]</a></p> | 412 href="#refsCSS21">[CSS21]</a></p> |
| 414 | 413 |
| 415 <h3><a name=terminology></a>1.2. Terminology</h3> | 414 <h3><a name=terminology></a>1.2. Terminology</h3> |
| 416 | 415 |
| 417 <p>All of the text of this specification is normative except | 416 <p>All of the text of this specification is normative except |
| 418 examples, notes, and sections explicitly marked as | 417 examples, notes, and sections explicitly marked as |
| 419 non-normative.</p> | 418 non-normative.</p> |
| 420 | 419 |
| 421 <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3> | 420 <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3> |
| 422 | 421 |
| 423 <p><em>This section is non-normative.</em></p> | 422 <p><em>This section is non-normative.</em></p> |
| 424 | 423 |
| 425 <p>The main differences between the selectors in CSS2 and those in | 424 <p>The main differences between the selectors in CSS2 and those in |
| 426 Selectors are: | 425 Selectors are: |
| 427 | 426 |
| 428 <ul> | 427 <ul> |
| 429 | 428 |
| 430 <li>the list of basic definitions (selector, group of selectors, | 429 <li>the list of basic definitions (selector, group of selectors, |
| 431 simple selector, etc.) has been changed; in particular, what was | 430 simple selector, etc.) has been changed; in particular, what was |
| 432 referred to in CSS2 as a simple selector is now called a sequence | 431 referred to in CSS2 as a simple selector is now called a sequence |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1595 | 1594 |
| 1596 | 1595 |
| 1597 <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5> | 1596 <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5> |
| 1598 | 1597 |
| 1599 <div class="note"> | 1598 <div class="note"> |
| 1600 | 1599 |
| 1601 <p>Radio and checkbox elements can be toggled by the user, but are | 1600 <p>Radio and checkbox elements can be toggled by the user, but are |
| 1602 sometimes in an indeterminate state, neither checked nor unchecked. | 1601 sometimes in an indeterminate state, neither checked nor unchecked. |
| 1603 This can be due to an element attribute, or DOM manipulation.</p> | 1602 This can be due to an element attribute, or DOM manipulation.</p> |
| 1604 | 1603 |
| 1605 <p>A future version of this specification may introduce an | 1604 <p>A future version of this specification may introduce an |
| 1606 <code>:indeterminate</code> pseudo-class that applies to such elements. | 1605 <code>:indeterminate</code> pseudo-class that applies to such elements. |
| 1607 <!--While the <code>:indeterminate</code> pseudo-class is dynamic in | 1606 <!--While the <code>:indeterminate</code> pseudo-class is dynamic in |
| 1608 nature, and is altered by user action, since it can also be based on | 1607 nature, and is altered by user action, since it can also be based on |
| 1609 the presence of an element attribute, it applies to all media.</p> | 1608 the presence of an element attribute, it applies to all media.</p> |
| 1610 | 1609 |
| 1611 <p>Components of a radio-group initialized with no pre-selected choice | 1610 <p>Components of a radio-group initialized with no pre-selected choice |
| 1612 are an example of :indeterminate state.--></p> | 1611 are an example of :indeterminate state.--></p> |
| 1613 | 1612 |
| 1614 </div> | 1613 </div> |
| 1615 | 1614 |
| 1616 | 1615 |
| 1617 <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4> | 1616 <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4> |
| 1618 | 1617 |
| 1619 <p>Selectors introduces the concept of <dfn>structural | 1618 <p>Selectors introduces the concept of <dfn>structural |
| 1620 pseudo-classes</dfn> to permit selection based on extra information that lies in | 1619 pseudo-classes</dfn> to permit selection based on extra information that lies in |
| 1621 the document tree but cannot be represented by other simple selectors or | 1620 the document tree but cannot be represented by other simple selectors or |
| 1622 combinators. | 1621 combinators. |
| 1623 | 1622 |
| 1624 <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are | 1623 <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are |
| 1625 not counted when calculating the position of an element in the list of | 1624 not counted when calculating the position of an element in the list of |
| 1626 children of its parent. When calculating the position of an element in | 1625 children of its parent. When calculating the position of an element in |
| 1627 the list of children of its parent, the index numbering starts at 1. | 1626 the list of children of its parent, the index numbering starts at 1. |
| 1628 | 1627 |
| 1629 | 1628 |
| 1630 <h5><a name=root-pseudo>:root pseudo-class</a></h5> | 1629 <h5><a name=root-pseudo>:root pseudo-class</a></h5> |
| 1631 | 1630 |
| 1632 <p>The <code>:root</code> pseudo-class represents an element that is | 1631 <p>The <code>:root</code> pseudo-class represents an element that is |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 <p>Examples:</p> | 1803 <p>Examples:</p> |
| 1805 <p>The following selector represents a <code>p</code> element that is | 1804 <p>The following selector represents a <code>p</code> element that is |
| 1806 the first child of a <code>div</code> element:</p> | 1805 the first child of a <code>div</code> element:</p> |
| 1807 <pre>div > p:first-child</pre> | 1806 <pre>div > p:first-child</pre> |
| 1808 <p>This selector can represent the <code>p</code> inside the | 1807 <p>This selector can represent the <code>p</code> inside the |
| 1809 <code>div</code> of the following fragment:</p> | 1808 <code>div</code> of the following fragment:</p> |
| 1810 <pre><p> The last P before the note.</p> | 1809 <pre><p> The last P before the note.</p> |
| 1811 <div class="note"> | 1810 <div class="note"> |
| 1812 <p> The first P inside the note.</p> | 1811 <p> The first P inside the note.</p> |
| 1813 </div></pre>but cannot represent the second <code>p</code> in the followin
g | 1812 </div></pre>but cannot represent the second <code>p</code> in the followin
g |
| 1814 fragment: | 1813 fragment: |
| 1815 <pre><p> The last P before the note.</p> | 1814 <pre><p> The last P before the note.</p> |
| 1816 <div class="note"> | 1815 <div class="note"> |
| 1817 <h2> Note </h2> | 1816 <h2> Note </h2> |
| 1818 <p> The first P inside the note.</p> | 1817 <p> The first P inside the note.</p> |
| 1819 </div></pre> | 1818 </div></pre> |
| 1820 <p>The following two selectors are usually equivalent:</p> | 1819 <p>The following two selectors are usually equivalent:</p> |
| 1821 <pre>* > a:first-child /* a is first child of any element */ | 1820 <pre>* > a:first-child /* a is first child of any element */ |
| 1822 a:first-child /* Same (assuming a is not the root element) */</pre> | 1821 a:first-child /* Same (assuming a is not the root element) */</pre> |
| 1823 </div> | 1822 </div> |
| 1824 | 1823 |
| 1825 <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5> | 1824 <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5> |
| 1826 | 1825 |
| 1827 <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo-
class | 1826 <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo-
class |
| 1828 represents an element that is the last child of some other element. | 1827 represents an element that is the last child of some other element. |
| 1829 | 1828 |
| 1830 <div class="example"> | 1829 <div class="example"> |
| 1831 <p>Example:</p> | 1830 <p>Example:</p> |
| 1832 <p>The following selector represents a list item <code>li</code> that | 1831 <p>The following selector represents a list item <code>li</code> that |
| 1833 is the last child of an ordered list <code>ol</code>. | 1832 is the last child of an ordered list <code>ol</code>. |
| 1834 <pre>ol > li:last-child</pre> | 1833 <pre>ol > li:last-child</pre> |
| 1835 </div> | 1834 </div> |
| 1836 | 1835 |
| 1837 <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5> | 1836 <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5> |
| 1838 | 1837 |
| 1839 <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo-
class | 1838 <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo-
class |
| 1840 represents an element that is the first sibling of its type in the list of | 1839 represents an element that is the first sibling of its type in the list of |
| 1841 children of its parent element. | 1840 children of its parent element. |
| 1842 | 1841 |
| 1843 <div class="example"> | 1842 <div class="example"> |
| 1844 <p>Example:</p> | 1843 <p>Example:</p> |
| 1845 <p>The following selector represents a definition title | 1844 <p>The following selector represents a definition title |
| 1846 <code>dt</code> inside a definition list <code>dl</code>, this | 1845 <code>dt</code> inside a definition list <code>dl</code>, this |
| 1847 <code>dt</code> being the first of its type in the list of children of | 1846 <code>dt</code> being the first of its type in the list of children of |
| 1848 its parent element.</p> | 1847 its parent element.</p> |
| 1849 <pre>dl dt:first-of-type</pre> | 1848 <pre>dl dt:first-of-type</pre> |
| 1850 <p>It is a valid description for the first two <code>dt</code> | 1849 <p>It is a valid description for the first two <code>dt</code> |
| 1851 elements in the following example but not for the third one:</p> | 1850 elements in the following example but not for the third one:</p> |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 | 2009 |
| 2011 <p>The selector <code>p::first-line</code> does not match any real | 2010 <p>The selector <code>p::first-line</code> does not match any real |
| 2012 HTML element. It does match a pseudo-element that conforming user | 2011 HTML element. It does match a pseudo-element that conforming user |
| 2013 agents will insert at the beginning of every paragraph.</p> | 2012 agents will insert at the beginning of every paragraph.</p> |
| 2014 | 2013 |
| 2015 <p>Note that the length of the first line depends on a number of | 2014 <p>Note that the length of the first line depends on a number of |
| 2016 factors, including the width of the page, the font size, etc. Thus, | 2015 factors, including the width of the page, the font size, etc. Thus, |
| 2017 an ordinary HTML paragraph such as:</p> | 2016 an ordinary HTML paragraph such as:</p> |
| 2018 | 2017 |
| 2019 <pre> | 2018 <pre> |
| 2020 <P>This is a somewhat long HTML | 2019 <P>This is a somewhat long HTML |
| 2021 paragraph that will be broken into several | 2020 paragraph that will be broken into several |
| 2022 lines. The first line will be identified | 2021 lines. The first line will be identified |
| 2023 by a fictional tag sequence. The other lines | 2022 by a fictional tag sequence. The other lines |
| 2024 will be treated as ordinary lines in the | 2023 will be treated as ordinary lines in the |
| 2025 paragraph.</P> | 2024 paragraph.</P> |
| 2026 </pre> | 2025 </pre> |
| 2027 | 2026 |
| 2028 <p>the lines of which happen to be broken as follows: | 2027 <p>the lines of which happen to be broken as follows: |
| 2029 | 2028 |
| 2030 <pre> | 2029 <pre> |
| 2031 THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT | 2030 THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT |
| 2032 will be broken into several lines. The first | 2031 will be broken into several lines. The first |
| 2033 line will be identified by a fictional tag | 2032 line will be identified by a fictional tag |
| 2034 sequence. The other lines will be treated as | 2033 sequence. The other lines will be treated as |
| 2035 ordinary lines in the paragraph. | 2034 ordinary lines in the paragraph. |
| 2036 </pre> | 2035 </pre> |
| 2037 | 2036 |
| 2038 <p>This paragraph might be "rewritten" by user agents to include the | 2037 <p>This paragraph might be "rewritten" by user agents to include the |
| 2039 <em>fictional tag sequence</em> for <code>::first-line</code>. This | 2038 <em>fictional tag sequence</em> for <code>::first-line</code>. This |
| 2040 fictional tag sequence helps to show how properties are inherited.</p> | 2039 fictional tag sequence helps to show how properties are inherited.</p> |
| 2041 | 2040 |
| 2042 <pre> | 2041 <pre> |
| 2043 <P><b><P::first-line></b> This is a somewhat long HTML | 2042 <P><b><P::first-line></b> This is a somewhat long HTML |
| 2044 paragraph that <b></P::first-line></b> will be broken into several | 2043 paragraph that <b></P::first-line></b> will be broken into several |
| 2045 lines. The first line will be identified | 2044 lines. The first line will be identified |
| 2046 by a fictional tag sequence. The other lines | 2045 by a fictional tag sequence. The other lines |
| 2047 will be treated as ordinary lines in the | 2046 will be treated as ordinary lines in the |
| 2048 paragraph.</P> | 2047 paragraph.</P> |
| 2049 </pre> | 2048 </pre> |
| 2050 | 2049 |
| 2051 <p>If a pseudo-element breaks up a real element, the desired effect | 2050 <p>If a pseudo-element breaks up a real element, the desired effect |
| 2052 can often be described by a fictional tag sequence that closes and | 2051 can often be described by a fictional tag sequence that closes and |
| 2053 then re-opens the element. Thus, if we mark up the previous paragraph | 2052 then re-opens the element. Thus, if we mark up the previous paragraph |
| 2054 with a <code>span</code> element:</p> | 2053 with a <code>span</code> element:</p> |
| 2055 | 2054 |
| 2056 <pre> | 2055 <pre> |
| 2057 <P><b><SPAN class="test"></b> This is a somewhat long HTML | 2056 <P><b><SPAN class="test"></b> This is a somewhat long HTML |
| 2058 paragraph that will be broken into several | 2057 paragraph that will be broken into several |
| 2059 lines.<b></SPAN></b> The first line will be identified | 2058 lines.<b></SPAN></b> The first line will be identified |
| 2060 by a fictional tag sequence. The other lines | 2059 by a fictional tag sequence. The other lines |
| 2061 will be treated as ordinary lines in the | 2060 will be treated as ordinary lines in the |
| 2062 paragraph.</P> | 2061 paragraph.</P> |
| 2063 </pre> | 2062 </pre> |
| 2064 | 2063 |
| 2065 <p>the user agent could simulate start and end tags for | 2064 <p>the user agent could simulate start and end tags for |
| 2066 <code>span</code> when inserting the fictional tag sequence for | 2065 <code>span</code> when inserting the fictional tag sequence for |
| 2067 <code>::first-line</code>. | 2066 <code>::first-line</code>. |
| 2068 | 2067 |
| 2069 <pre> | 2068 <pre> |
| 2070 <P><P::first-line><b><SPAN class="test"></b> This is a | 2069 <P><P::first-line><b><SPAN class="test"></b> This is a |
| 2071 somewhat long HTML | 2070 somewhat long HTML |
| 2072 paragraph that will <b></SPAN></b></P::first-line><b><SPAN class=
"test"></b> be | 2071 paragraph that will <b></SPAN></b></P::first-line><b><SPAN class=
"test"></b> be |
| 2073 broken into several | 2072 broken into several |
| 2074 lines.<b></SPAN></b> The first line will be identified | 2073 lines.<b></SPAN></b> The first line will be identified |
| 2075 by a fictional tag sequence. The other lines | 2074 by a fictional tag sequence. The other lines |
| 2076 will be treated as ordinary lines in the | 2075 will be treated as ordinary lines in the |
| 2077 paragraph.</P> | 2076 paragraph.</P> |
| 2078 </pre> | 2077 </pre> |
| 2079 | 2078 |
| 2080 <p>In CSS, the <code>::first-line</code> pseudo-element can only be | 2079 <p>In CSS, the <code>::first-line</code> pseudo-element can only be |
| 2081 attached to a block-level element, an inline-block, a table-caption, | 2080 attached to a block-level element, an inline-block, a table-caption, |
| 2082 or a table-cell.</p> | 2081 or a table-cell.</p> |
| 2083 | 2082 |
| 2084 <p><a name="first-formatted-line"></a>The "first formatted line" of an | 2083 <p><a name="first-formatted-line"></a>The "first formatted line" of an |
| 2085 element may occur inside a | 2084 element may occur inside a |
| 2086 block-level descendant in the same flow (i.e., a block-level | 2085 block-level descendant in the same flow (i.e., a block-level |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 | 2203 |
| 2205 <p>The <span class="index-inst" title="fictional tag | 2204 <p>The <span class="index-inst" title="fictional tag |
| 2206 sequence">fictional tag sequence</span> is:</p> | 2205 sequence">fictional tag sequence</span> is:</p> |
| 2207 | 2206 |
| 2208 <pre> | 2207 <pre> |
| 2209 <P> | 2208 <P> |
| 2210 <SPAN> | 2209 <SPAN> |
| 2211 <P::first-letter> | 2210 <P::first-letter> |
| 2212 T | 2211 T |
| 2213 </P::first-letter>he first | 2212 </P::first-letter>he first |
| 2214 </SPAN> | 2213 </SPAN> |
| 2215 few words of an article in the Economist. | 2214 few words of an article in the Economist. |
| 2216 </P> | 2215 </P> |
| 2217 </pre> | 2216 </pre> |
| 2218 | 2217 |
| 2219 <p>Note that the <code>::first-letter</code> pseudo-element tags abut | 2218 <p>Note that the <code>::first-letter</code> pseudo-element tags abut |
| 2220 the content (i.e., the initial character), while the ::first-line | 2219 the content (i.e., the initial character), while the ::first-line |
| 2221 pseudo-element start tag is inserted right after the start tag of the | 2220 pseudo-element start tag is inserted right after the start tag of the |
| 2222 block element.</p> </div> | 2221 block element.</p> </div> |
| 2223 | 2222 |
| 2224 <p>In order to achieve traditional drop caps formatting, user agents | 2223 <p>In order to achieve traditional drop caps formatting, user agents |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2315 p::first-line { color: blue } | 2314 p::first-line { color: blue } |
| 2316 | 2315 |
| 2317 <P>Some text that ends up on two lines</P></pre> | 2316 <P>Some text that ends up on two lines</P></pre> |
| 2318 | 2317 |
| 2319 <p>Assuming that a line break will occur before the word "ends", the | 2318 <p>Assuming that a line break will occur before the word "ends", the |
| 2320 <span class="index-inst" title="fictional tag sequence">fictional tag | 2319 <span class="index-inst" title="fictional tag sequence">fictional tag |
| 2321 sequence</span> for this fragment might be:</p> | 2320 sequence</span> for this fragment might be:</p> |
| 2322 | 2321 |
| 2323 <pre><P> | 2322 <pre><P> |
| 2324 <P::first-line> | 2323 <P::first-line> |
| 2325 <P::first-letter> | 2324 <P::first-letter> |
| 2326 S | 2325 S |
| 2327 </P::first-letter>ome text that | 2326 </P::first-letter>ome text that |
| 2328 </P::first-line> | 2327 </P::first-line> |
| 2329 ends up on two lines | 2328 ends up on two lines |
| 2330 </P></pre> | 2329 </P></pre> |
| 2331 | 2330 |
| 2332 <p>Note that the <code>::first-letter</code> element is inside the <code>::first
-line</code> | 2331 <p>Note that the <code>::first-letter</code> element is inside the <code>::first
-line</code> |
| 2333 element. Properties set on <code>::first-line</code> are inherited by | 2332 element. Properties set on <code>::first-line</code> are inherited by |
| 2334 <code>::first-letter</code>, but are overridden if the same property is set on | 2333 <code>::first-letter</code>, but are overridden if the same property is set on |
| 2335 <code>::first-letter</code>.</p> | 2334 <code>::first-letter</code>.</p> |
| 2336 </div> | 2335 </div> |
| 2337 | 2336 |
| 2338 | 2337 |
| 2339 <h4><a name=UIfragments>7.3.</a> <a name=selection>The ::selection pseudo-elemen
t</a></h4> | 2338 <h4><a name=UIfragments>7.3.</a> <a name=selection>The ::selection pseudo-elemen
t</a></h4> |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2826 <th>Specification</th> | 2825 <th>Specification</th> |
| 2827 <td>CSS level 1</td></tr> | 2826 <td>CSS level 1</td></tr> |
| 2828 <tr> | 2827 <tr> |
| 2829 <th>Accepts</th> | 2828 <th>Accepts</th> |
| 2830 <td>type selectors<br>class selectors<br>ID selectors<br>:link, | 2829 <td>type selectors<br>class selectors<br>ID selectors<br>:link, |
| 2831 :visited and :active pseudo-classes<br>descendant combinator | 2830 :visited and :active pseudo-classes<br>descendant combinator |
| 2832 <br>::first-line and ::first-letter pseudo-elements</td></tr> | 2831 <br>::first-line and ::first-letter pseudo-elements</td></tr> |
| 2833 <tr> | 2832 <tr> |
| 2834 <th>Excludes</th> | 2833 <th>Excludes</th> |
| 2835 <td> | 2834 <td> |
| 2836 | 2835 |
| 2837 <p>universal selector<br>attribute selectors<br>:hover and :focus | 2836 <p>universal selector<br>attribute selectors<br>:hover and :focus |
| 2838 pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI | 2837 pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI |
| 2839 element states pseudo-classes<br>all structural | 2838 element states pseudo-classes<br>all structural |
| 2840 pseudo-classes<br>negation pseudo-class<br>all | 2839 pseudo-classes<br>negation pseudo-class<br>all |
| 2841 UI element fragments pseudo-elements<br>::before and ::after | 2840 UI element fragments pseudo-elements<br>::before and ::after |
| 2842 pseudo-elements<br>child combinators<br>sibling combinators | 2841 pseudo-elements<br>child combinators<br>sibling combinators |
| 2843 | 2842 |
| 2844 <p>namespaces</td></tr> | 2843 <p>namespaces</td></tr> |
| 2845 <tr> | 2844 <tr> |
| 2846 <th>Extra constraints</th> | 2845 <th>Extra constraints</th> |
| 2847 <td>only one class selector allowed per sequence of simple | 2846 <td>only one class selector allowed per sequence of simple |
| 2848 selectors</td></tr></tbody></table><br><br> | 2847 selectors</td></tr></tbody></table><br><br> |
| 2849 <table class="tprofile"> | 2848 <table class="tprofile"> |
| 2850 <tbody> | 2849 <tbody> |
| 2851 <tr> | 2850 <tr> |
| 2852 <th class="title" colspan=2>Selectors profile</th></tr> | 2851 <th class="title" colspan=2>Selectors profile</th></tr> |
| 2853 <tr> | 2852 <tr> |
| 2854 <th>Specification</th> | 2853 <th>Specification</th> |
| 2855 <td>CSS level 2</td></tr> | 2854 <td>CSS level 2</td></tr> |
| 2856 <tr> | 2855 <tr> |
| 2857 <th>Accepts</th> | 2856 <th>Accepts</th> |
| 2858 <td>type selectors<br>universal selector<br>attribute presence and | 2857 <td>type selectors<br>universal selector<br>attribute presence and |
| 2859 values selectors<br>class selectors<br>ID selectors<br>:link, :visited, | 2858 values selectors<br>class selectors<br>ID selectors<br>:link, :visited, |
| 2860 :active, :hover, :focus, :lang() and :first-child pseudo-classes | 2859 :active, :hover, :focus, :lang() and :first-child pseudo-classes |
| 2861 <br>descendant combinator<br>child combinator<br>adjacent sibling | 2860 <br>descendant combinator<br>child combinator<br>adjacent sibling |
| 2862 combinator<br>::first-line and ::first-letter pseudo-elements<br>::before | 2861 combinator<br>::first-line and ::first-letter pseudo-elements<br>::before |
| 2863 and ::after pseudo-elements</td></tr> | 2862 and ::after pseudo-elements</td></tr> |
| 2864 <tr> | 2863 <tr> |
| 2865 <th>Excludes</th> | 2864 <th>Excludes</th> |
| 2866 <td> | 2865 <td> |
| 2867 | 2866 |
| 2868 <p>content selectors<br>substring matching attribute | 2867 <p>content selectors<br>substring matching attribute |
| 2869 selectors<br>:target pseudo-classes<br>all UI element | 2868 selectors<br>:target pseudo-classes<br>all UI element |
| 2870 states pseudo-classes<br>all structural pseudo-classes other | 2869 states pseudo-classes<br>all structural pseudo-classes other |
| 2871 than :first-child<br>negation pseudo-class<br>all UI element | 2870 than :first-child<br>negation pseudo-class<br>all UI element |
| 2872 fragments pseudo-elements<br>general sibling combinators | 2871 fragments pseudo-elements<br>general sibling combinators |
| 2873 | 2872 |
| 2874 <p>namespaces</td></tr> | 2873 <p>namespaces</td></tr> |
| 2875 <tr> | 2874 <tr> |
| 2876 <th>Extra constraints</th> | 2875 <th>Extra constraints</th> |
| 2877 <td>more than one class selector per sequence of simple selectors (CSS1 | 2876 <td>more than one class selector per sequence of simple selectors (CSS1 |
| 2878 constraint) allowed</td></tr></tbody></table> | 2877 constraint) allowed</td></tr></tbody></table> |
| 2879 | 2878 |
| 2880 <p>In CSS, selectors express pattern matching rules that determine which style | 2879 <p>In CSS, selectors express pattern matching rules that determine which style |
| 2881 rules apply to elements in the document tree. | 2880 rules apply to elements in the document tree. |
| 2882 | 2881 |
| 2883 <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</c
ode> | 2882 <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</c
ode> |
| 2884 with attribute <code>name</code> set inside a section 1 header <code>h1</code>: | 2883 with attribute <code>name</code> set inside a section 1 header <code>h1</code>: |
| 2885 <pre>h1 a[name]</pre> | 2884 <pre>h1 a[name]</pre> |
| 2886 | 2885 |
| 2887 <p>All CSS declarations attached to such a selector are applied to elements | 2886 <p>All CSS declarations attached to such a selector are applied to elements |
| 2888 matching it. </div> | 2887 matching it. </div> |
| 2889 | 2888 |
| 2890 <div class="profile"> | 2889 <div class="profile"> |
| 2891 <table class="tprofile"> | 2890 <table class="tprofile"> |
| 2892 <tbody> | 2891 <tbody> |
| 2893 <tr> | 2892 <tr> |
| 2894 <th class="title" colspan=2>Selectors profile</th></tr> | 2893 <th class="title" colspan=2>Selectors profile</th></tr> |
| 2895 <tr> | 2894 <tr> |
| 2896 <th>Specification</th> | 2895 <th>Specification</th> |
| 2897 <td>STTS 3</td> | 2896 <td>STTS 3</td> |
| 2898 </tr> | 2897 </tr> |
| 2899 <tr> | 2898 <tr> |
| 2900 <th>Accepts</th> | 2899 <th>Accepts</th> |
| 2901 <td> | 2900 <td> |
| 2902 | 2901 |
| 2903 <p>type selectors<br>universal selectors<br>attribute selectors<br>class | 2902 <p>type selectors<br>universal selectors<br>attribute selectors<br>class |
| 2904 selectors<br>ID selectors<br>all structural pseudo-classes<br> | 2903 selectors<br>ID selectors<br>all structural pseudo-classes<br> |
| 2905 all combinators | 2904 all combinators |
| 2906 | 2905 |
| 2907 <p>namespaces</td></tr> | 2906 <p>namespaces</td></tr> |
| 2908 <tr> | 2907 <tr> |
| 2909 <th>Excludes</th> | 2908 <th>Excludes</th> |
| 2910 <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr> | 2909 <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr> |
| 2911 <tr> | 2910 <tr> |
| 2912 <th>Extra constraints</th> | 2911 <th>Extra constraints</th> |
| 2913 <td>some selectors and combinators are not allowed in fragment | 2912 <td>some selectors and combinators are not allowed in fragment |
| 2914 descriptions on the right side of STTS declarations.</td></tr></tbody></ta
ble> | 2913 descriptions on the right side of STTS declarations.</td></tr></tbody></ta
ble> |
| 2915 <form> | 2914 <form> |
| 2916 <input type="text" name="test10"/> | 2915 <input type="text" name="test10"/> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2932 <input type="text" name="foo"/> | 2931 <input type="text" name="foo"/> |
| 2933 <input type="text" name="foo"/> | 2932 <input type="text" name="foo"/> |
| 2934 <input type="text" name="foo"/> | 2933 <input type="text" name="foo"/> |
| 2935 <input type="text" name="foo"/> | 2934 <input type="text" name="foo"/> |
| 2936 <input type="text" name="foo"/> | 2935 <input type="text" name="foo"/> |
| 2937 <input type="text" name="foo"/> | 2936 <input type="text" name="foo"/> |
| 2938 <input type="text" name="foo"/> | 2937 <input type="text" name="foo"/> |
| 2939 <input type="text" name="foo"/> | 2938 <input type="text" name="foo"/> |
| 2940 <input type="text" name="foo"/> | 2939 <input type="text" name="foo"/> |
| 2941 </form> | 2940 </form> |
| 2942 | 2941 |
| 2943 <p>Selectors can be used in STTS 3 in two different | 2942 <p>Selectors can be used in STTS 3 in two different |
| 2944 manners: | 2943 manners: |
| 2945 <ol> | 2944 <ol> |
| 2946 <li>a selection mechanism equivalent to CSS selection mechanism: declarations | 2945 <li>a selection mechanism equivalent to CSS selection mechanism: declarations |
| 2947 attached to a given selector are applied to elements matching that selector, | 2946 attached to a given selector are applied to elements matching that selector, |
| 2948 <li>fragment descriptions that appear on the right side of declarations. | 2947 <li>fragment descriptions that appear on the right side of declarations. |
| 2949 </li></ol></div> | 2948 </li></ol></div> |
| 2950 | 2949 |
| 2951 <h2><a name=Conformance></a>13. Conformance and requirements</h2> | 2950 <h2><a name=Conformance></a>13. Conformance and requirements</h2> |
| 2952 | 2951 |
| 2953 <p>This section defines conformance with the present specification only. | 2952 <p>This section defines conformance with the present specification only. |
| 2954 | 2953 |
| 2955 <p>The inability of a user agent to implement part of this specification due to | 2954 <p>The inability of a user agent to implement part of this specification due to |
| 2956 the limitations of a particular device (e.g., non interactive user agents will | 2955 the limitations of a particular device (e.g., non interactive user agents will |
| 2957 probably not implement dynamic pseudo-classes because they make no sense without | 2956 probably not implement dynamic pseudo-classes because they make no sense without |
| 2958 interactivity) does not imply non-conformance. | 2957 interactivity) does not imply non-conformance. |
| 2959 | 2958 |
| 2960 <p>All specifications reusing Selectors must contain a <a | 2959 <p>All specifications reusing Selectors must contain a <a |
| 2961 href="#profiling">Profile</a> listing the | 2960 href="#profiling">Profile</a> listing the |
| 2962 subset of Selectors it accepts or excludes, and describing the constraints | 2961 subset of Selectors it accepts or excludes, and describing the constraints |
| 2963 it adds to the current specification. | 2962 it adds to the current specification. |
| 2964 | 2963 |
| 2965 <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a toke
n | 2964 <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a toke
n |
| 2966 which is not allowed at the current parsing point. | 2965 which is not allowed at the current parsing point. |
| 2967 | 2966 |
| 2968 <p>User agents must observe the rules for handling parsing errors: | 2967 <p>User agents must observe the rules for handling parsing errors: |
| 2969 <ul> | 2968 <ul> |
| 2970 <li>a simple selector containing an undeclared namespace prefix is invalid</li
> | 2969 <li>a simple selector containing an undeclared namespace prefix is invalid</li
> |
| 2971 <li>a selector containing an invalid simple selector, an invalid combinator | 2970 <li>a selector containing an invalid simple selector, an invalid combinator |
| 2972 or an invalid token is invalid. </li> | 2971 or an invalid token is invalid. </li> |
| 2973 <li>a group of selectors containing an invalid selector is invalid.</li> | 2972 <li>a group of selectors containing an invalid selector is invalid.</li> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3006 | 3005 |
| 3007 <h2><a name=references>16. References</a></h2> | 3006 <h2><a name=references>16. References</a></h2> |
| 3008 | 3007 |
| 3009 <dl class="refs"> | 3008 <dl class="refs"> |
| 3010 | 3009 |
| 3011 <dt>[CSS1] | 3010 <dt>[CSS1] |
| 3012 <dd><a name=refsCSS1></a> Bert Bos, Håkon Wium Lie; "<cite>Cascading Sty
le Sheets, level 1</cite>", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999 | 3011 <dd><a name=refsCSS1></a> Bert Bos, Håkon Wium Lie; "<cite>Cascading Sty
le Sheets, level 1</cite>", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999 |
| 3013 <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CS
S1</a></code>) | 3012 <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CS
S1</a></code>) |
| 3014 | 3013 |
| 3015 <dt>[CSS21] | 3014 <dt>[CSS21] |
| 3016 <dd><a name=refsCSS21></a> Bert Bos, Tantek Çelik, Ian Hickson, Hå
;kon Wium Lie, editors; "<cite>Cascading Style Sheets, level 2 revision 1</cite>
", W3C Working Draft, 13 June 2005 | 3015 <dd><a name=refsCSS21></a> Bert Bos, Tantek Çelik, Ian Hickson, Hå
;kon Wium Lie, editors; "<cite>Cascading Style Sheets, level 2 revision 1</cite>
", W3C Working Draft, 13 June 2005 |
| 3017 <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a>
</code>) | 3016 <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a>
</code>) |
| 3018 | 3017 |
| 3019 <dt>[CWWW] | 3018 <dt>[CWWW] |
| 3020 <dd><a name=refsCWWW></a> Martin J. Dürst, François Yergeau, Misha
Wolf, Asmus Freytag, Tex Texin, editors; "<cite>Character Model for the World W
ide Web</cite>", W3C Recommendation, 15 February 2005 | 3019 <dd><a name=refsCWWW></a> Martin J. Dürst, François Yergeau, Misha
Wolf, Asmus Freytag, Tex Texin, editors; "<cite>Character Model for the World W
ide Web</cite>", W3C Recommendation, 15 February 2005 |
| 3021 <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmo
d/</a></code>) | 3020 <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmo
d/</a></code>) |
| 3022 | 3021 |
| 3023 <dt>[FLEX] | 3022 <dt>[FLEX] |
| 3024 <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>"
, Version 2.3.7, ISBN 1882114213 | 3023 <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>"
, Version 2.3.7, ISBN 1882114213 |
| 3025 | 3024 |
| 3026 <dt>[HTML4] | 3025 <dt>[HTML4] |
| 3027 <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors;
"<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999 | 3026 <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors;
"<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999 |
| 3028 <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</
code></a>) | 3027 <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</
code></a>) |
| 3029 | 3028 |
| 3030 <dt>[MATH] | 3029 <dt>[MATH] |
| 3031 <dd><a name="refsMATH"></a> Patrick Ion, Robert Miner, editors; "<cite>Mathema
tical Markup Language (MathML) 1.01</cite>", W3C Recommendation, revision of 7 J
uly 1999 | 3030 <dd><a name="refsMATH"></a> Patrick Ion, Robert Miner, editors; "<cite>Mathema
tical Markup Language (MathML) 1.01</cite>", W3C Recommendation, revision of 7 J
uly 1999 |
| 3032 <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC
-MathML/</a></code>) | 3031 <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC
-MathML/</a></code>) |
| 3033 | 3032 |
| 3034 <dt>[RFC3066] | 3033 <dt>[RFC3066] |
| 3035 <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identificati
on of Languages</cite>", Request for Comments 3066, January 2001 | 3034 <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identificati
on of Languages</cite>", Request for Comments 3066, January 2001 |
| 3036 <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/r
fc/rfc3066.txt</code></a>) | 3035 <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/r
fc/rfc3066.txt</code></a>) |
| 3037 | 3036 |
| 3038 <dt>[STTS] | 3037 <dt>[STTS] |
| 3039 <dd><a name=refsSTTS></a> Daniel Glazman; "<cite>Simple Tree Transformation Sh
eets 3</cite>", Electricité de France, submission to the W3C, 11 November
1998 | 3038 <dd><a name=refsSTTS></a> Daniel Glazman; "<cite>Simple Tree Transformation Sh
eets 3</cite>", Electricité de France, submission to the W3C, 11 November
1998 |
| 3040 <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE
-STTS3</a></code>) | 3039 <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE
-STTS3</a></code>) |
| 3041 | 3040 |
| 3042 <dt>[SVG] | 3041 <dt>[SVG] |
| 3043 <dd><a name="refsSVG"></a> Jon Ferraiolo, 藤沢 淳, Dean Jack
son, editors; "<cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>", W
3C Recommendation, 14 January 2003 | 3042 <dd><a name="refsSVG"></a> Jon Ferraiolo, 藤沢 淳, Dean Jack
son, editors; "<cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>", W
3C Recommendation, 14 January 2003 |
| 3044 <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></
code>) | 3043 <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></
code>) |
| 3045 | 3044 |
| 3046 <dt>[UNICODE]</dt> | 3045 <dt>[UNICODE]</dt> |
| 3047 <dd><a name="refsUNICODE"></a> <cite><a | 3046 <dd><a name="refsUNICODE"></a> <cite><a |
| 3048 href="http://www.unicode.org/versions/Unicode4.1.0/">The Unicode Standard, Ve
rsion 4.1</a></cite>, The Unicode Consortium. Boston, MA, Addison-Wesley, March
2005. ISBN 0-321-18578-1, as amended by <a href="http://www.unicode.org/versions
/Unicode4.0.1/">Unicode 4.0.1</a> and <a href="http://www.unicode.org/versions/U
nicode4.1.0/">Unicode 4.1.0</a>. | 3047 href="http://www.unicode.org/versions/Unicode4.1.0/">The Unicode Standard, Ve
rsion 4.1</a></cite>, The Unicode Consortium. Boston, MA, Addison-Wesley, March
2005. ISBN 0-321-18578-1, as amended by <a href="http://www.unicode.org/versions
/Unicode4.0.1/">Unicode 4.0.1</a> and <a href="http://www.unicode.org/versions/U
nicode4.1.0/">Unicode 4.1.0</a>. |
| 3049 <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/v
ersions/</a></code>)</dd> | 3048 <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/v
ersions/</a></code>)</dd> |
| 3050 | 3049 |
| 3051 <dt>[XML10] | 3050 <dt>[XML10] |
| 3052 <dd><a name="refsXML10"></a> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve
Maler, François Yergeau, editors; "<cite>Extensible Markup Language (XML
) 1.0 (Third Edition)</cite>", W3C Recommendation, 4 February 2004 | 3051 <dd><a name="refsXML10"></a> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve
Maler, François Yergeau, editors; "<cite>Extensible Markup Language (XML
) 1.0 (Third Edition)</cite>", W3C Recommendation, 4 February 2004 |
| 3053 <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xm
l/</code></a>) | 3052 <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xm
l/</code></a>) |
| 3054 | 3053 |
| 3055 <dt>[XMLNAMES] | 3054 <dt>[XMLNAMES] |
| 3056 <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, edito
rs; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999 | 3055 <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, edito
rs; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999 |
| 3057 <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/
REC-xml-names/</code></a>) | 3056 <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/
REC-xml-names/</code></a>) |
| 3058 | 3057 |
| 3059 <dt>[YACC] | 3058 <dt>[YACC] |
| 3060 <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC — Yet another com
piler compiler</cite>", Technical Report, Murray Hill, 1975 | 3059 <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC — Yet another com
piler compiler</cite>", Technical Report, Murray Hill, 1975 |
| 3061 | 3060 |
| 3062 </dl> | 3061 </dl> |
| 3063 </body> | 3062 </body> |
| 3064 </html> | 3063 </html> |
| OLD | NEW |