background-color-175

Background-color set to inherit

WeasyPrint

This browser

Assertion
Background-color set to inherit causes the background-color of the box to be the background-color designated on the parent element.

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: Background-color set to inherit</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#propdef-background-color">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background-properties">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="Background-color set to inherit causes the background-color of the box to be the background-color designated on the parent element.">
10         <style type="text/css">
11             div
12             {
13                 height: 1in;
14                 width: 1in;
15             }
16             #wrapper
17             {
18                 background-color: green;
19             }
20             #test
21             {
22                 border: 10px solid;
23                 background-color: red;
24                 background-color: inherit;
25             }
26         </style>
27     </head>
28     <body>
29         <p>Test passes if the black box is filled completely by a green background.</p>
30         <div id="wrapper">
31             <div id="test"></div>
32         </div>
33     </body>
34 </html>