c26-psudo-nest-000

Multiple Pseudo-Elements

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: Multiple Pseudo-Elements</title>
 5   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#multiple-pseudo-elements">
 6   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 7   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 8   <style type="text/css">
 9    body { color: blue; }
10    p:first-line { color: teal; }
11    p:first-letter { color: aqua; }
12    .one:first-line { font-size: 300%; }
13    .one:first-letter { font-size: 300%; }
14    p.two:first-letter { font-size: 200%; }
15    p.two:first-line { font-variant: small-caps; }
16    /* three uses the default styles */
17   </style>
18   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-letter" title="5.12.2 The :first-letter pseudo-element">
19   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo" title="5.12.1 The :first-line pseudo-element">
20  </head>
21  <body>
22   <p class="one">
23    The <strong>first letter</strong> of this paragraph, and only that
24    one, should be <strong>600% bigger</strong> than the normal text
25    (300% bigger than the rest of first line of this paragraph) and
26    <strong>aqua</strong>, while the entire <strong>first line</strong>
27    should be <strong>300% bigger</strong> than normal and
28    <strong>teal</strong>. If this precise combination does not occur,
29    then the user agent has failed this test. Remember that in order to
30    ensure a complete test, the paragraph must be displayed on more
31    than one line. (TEST1)
32   </p>
33   <p class="two">
34    "Test": The first <strong>two characters</strong> in this paragraph
35    (a double-quote mark and a capital 'T') should be <strong>200%
36    bigger</strong> than the rest of the paragraph, and
37    <strong>aqua</strong>. In addition, the entire <strong>first
38    line</strong> should be in a <strong>small-caps font and
39    teal</strong>. Remember that in order to ensure a complete test,
40    the paragraph must be displayed on more than one line. (TEST2)
41   </p>
42   <p>
43    The <strong>first letter</strong> of this paragraph, and only that
44    one, should be <strong>aqua</strong>, while the entire
45    <strong>first line</strong> should be <strong>teal</strong>. If
46    this precise combination does not occur, then the user agent has
47    failed this test. Remember that in order to ensure a complete test,
48    the paragraph must be displayed on more than one line. (TEST3)
49   </p>
50   <div>You should see the words <strong>"TEST1"</strong>,
51   <strong>"TEST2"</strong>, and <strong>"TEST3"</strong> at the end of
52   three paragraphs above.</div>
53  </body>
54 </html>