OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>CSS Test: applying flow-into and other formatting on specific lis
t items via :nth-child, :nth-of-type pseudo-classes</title> | |
5 <link rel="author" title="Mihai Balan" href="mibalan@adobe.com"> | |
6 <link rel="help" href="http://www.w3.org/TR/css3-regions/#properties-and
-rules" /> | |
7 <link rel="help" href="http://www.w3.org/TR/css3-regions/#the-flow-into-
property" /> | |
8 <link rel="stylesheet" type="text/css" href="../resources/font-smoothing
-disabler.css"> | |
9 <meta name="flags" content=""> | |
10 <meta name="assert" content="Test checks that pseudo-classes like :first
-child or :nth-of-type can be used both for styling and extracting only certain
list items from a list into a named flow."> | |
11 <style> | |
12 .container { | |
13 background-color: lightgreen; | |
14 color: #006400; | |
15 margin: 2em; | |
16 } | |
17 | |
18 #first li:first-child, | |
19 li:nth-child(even), | |
20 li:nth-of-type(4n) { | |
21 color: blue; | |
22 -webkit-flow-into: f1; | |
23 } | |
24 #first { | |
25 list-style-type: decimal; | |
26 } | |
27 #second { | |
28 list-style-type: disc; | |
29 } | |
30 #third { | |
31 list-style-type: upper-latin; | |
32 } | |
33 .region { | |
34 margin: 2em; | |
35 background-color: lightblue; | |
36 } | |
37 #r1 { | |
38 -webkit-flow-from: f1; | |
39 } | |
40 </style> | |
41 </head> | |
42 <body> | |
43 <!-- Individual list items are extracted from ordered/unordered lists. S
ome of them remain | |
44 in the normal document flow while others are rendered in a region. Pseud
o-elements are used | |
45 to extract the list items and format them. --> | |
46 <p>Test passes if you see two rectangles, one green and one blue, as des
cribed below:<br> | |
47 The green rectangle should contain three lists, separated by a small ver
tical space. The <strong>first list</strong> should be a numbered list starting
at 3, with only one item. The <strong>second list</strong> should be a bulleted
list with three items. The <strong>third list</strong> should be a numbered list
with two items, numbered A and C respectively.<br> | |
48 The blue rectangle should contain a list with items numbered/marked in a
different ways, as follows. As opposed to the green rectangle, the numbers/mark
ings for the list items in the blue rectangle should be outside the rectangle. T
he <strong>first and second items</strong> should be numbered with 1 and 2 (deci
mal). The <strong>third and fourth items</strong> should be bulleted. The <stron
g>fifth and sixth items</strong> should be numbered with B and D respectively.</
p> | |
49 <div class="container"> | |
50 <ol id="first"> | |
51 <li>First numbered list, item 1</li> | |
52 <li>First numbered list, item 2</li> | |
53 <li>First numbered list, item 3</li> | |
54 </ol> | |
55 <ul id="second"> | |
56 <li>Bullet list, item 1</li> | |
57 <li>Bullet list, item 2</li> | |
58 <li>Bullet list, item 3</li> | |
59 <li>Bullet list, item 4</li> | |
60 <li>Bullet list, item 5</li> | |
61 </ul> | |
62 <ol id="third"> | |
63 <li>Second numbered list, item A</li> | |
64 <li>Second numbered list, item B</li> | |
65 <li>Second numbered list, item C</li> | |
66 <li>Second numbered list, item D</li> | |
67 </ol> | |
68 </div> | |
69 <div class="region" id="r1"></div> | |
70 </body> | |
71 </html> | |
OLD | NEW |