multicol-rule-color-inherit-001

column-rule-color: inherit

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Flags
ahem
Assertion
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.

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 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 		&nbsp;
 76 		&nbsp;
 77 		&nbsp;
 78 		&nbsp;
 79 		&nbsp;
 80 		&nbsp;
 81 		&nbsp;
 82 		&nbsp;
 83 		&nbsp;
 84 		&nbsp;
 85 		&nbsp;
 86 		&nbsp;
 87 		&nbsp;
 88 		&nbsp;
 89 		&nbsp;
 90 		&nbsp;
 91 		&nbsp;
 92 		&nbsp;
 93 	</div>
 94 	<div class="child">
 95 		&nbsp;
 96 		&nbsp;
 97 		&nbsp;
 98 		&nbsp;
 99 		&nbsp;
100 		&nbsp;
101 		&nbsp;
102 		&nbsp;
103 		&nbsp;
104 		&nbsp;
105 		&nbsp;
106 		&nbsp;
107 		&nbsp;
108 		&nbsp;
109 		&nbsp;
110 		&nbsp;
111 		&nbsp;
112 		&nbsp;
113 	</div>
114 	<div class="child">
115 		&nbsp;
116 		&nbsp;
117 		&nbsp;
118 		&nbsp;
119 		&nbsp;
120 		&nbsp;
121 		&nbsp;
122 		&nbsp;
123 		&nbsp;
124 		&nbsp;
125 		&nbsp;
126 		&nbsp;
127 		&nbsp;
128 		&nbsp;
129 		&nbsp;
130 		&nbsp;
131 		&nbsp;
132 		&nbsp;
133 	</div>
134   </div>
135 
136  </body>
137 </html>