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