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 Multi-column Layout Test: column-rule-color: inherit</title>
5 <link rel="author" title="Opera Software ASA" href="http://www.opera.com/">
6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2013-09-02 -->
7 <link rel="help" href="http://www.w3.org/TR/css3-multicol/#crc" title="4.2. 'column-rule-color'">
8 <link rel="help" href="http://www.w3.org/TR/css3-values/#common-keywords" title="3.1.1. CSS-wide keywords: 'initial' and 'inherit'">
9 <link rel="match" href="reference/multicol-rule-color-inherit-001-ref.htm">
10 <meta name="flags" content="ahem">
11 <meta name="assert" content="This test checks that, by default, column-rule-color is the current color applying to the element unless reserved keyword 'inherit' is used in which case column-rule-color will be inherited from the parent's column-rule-color value.">
12 <style type="text/css">
13 div#parent
14 {
15 column-rule-color: green;
16 column-rule-style: none;
17 font: 1.25em/1 Ahem;
18 width: 17em;
19 }
20
21 /*
22
23 N == 3;
24
25 W == max(0, (available-width - ((N - 1) * column-gap)) / N);
26 W == max(0, (17em - ((3 - 1) * 1em)) / 3);
27 W == max(0, (17em - (2 * 1em)) / 3);
28 W == max(0, (17em - 2em) / 3);
29 W == max(0, 15em / 3);
30 W == max(0, 5em);
31 W == 5em;
32
33 The height of column rule depends on number of line boxes in
34 each outer column box which depends on number of line boxes
35 in each inner column box.
36
37 N == 3;
38
39 W == max(0, (available-width - ((N - 1) * column-gap)) / N);
40 W == max(0, (5em - ((3 - 1) * 1em)) / 3);
41 W == max(0, (5em - (2 * 1em)) / 3);
42 W == max(0, (5em - 2em) / 3);
43 W == max(0, 3em / 3);
44 W == max(0, 1em);
45 W == 1em;
46
47 */
48
49 div
50 {
51 color: red; /* both div#parent and div.child have and use 'color: red' */
52 orphans: 1;
53 widows: 1;
54
55 column-count: 3;
56 column-gap: 1em;
57 column-rule-width: 1em;
58 }
59
60 div.child
61 {
62 column-rule-color: inherit;
63 column-rule-style: solid;
64 font-size: 1em;
65 }
66 </style>
67 </head>
68
69 <body>
70
71 <p>Test passes if there are 6 vertical green stripes and <strong>no red</strong>.</p>
72
73 <div id="parent">
74 <div class="child">
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93 </div>
94 <div class="child">
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113 </div>
114 <div class="child">
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133 </div>
134 </div>
135
136 </body>
137 </html>