visibility-004

Visibility set to 'inherit'

WeasyPrint

This browser

Assertion
A block can inherit its 'visibility' behavior from its parent container.

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: Visibility 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/visufx.html#propdef-visibility">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#visibility">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="A block can inherit its 'visibility' behavior from its parent container.">
10         <style type="text/css">
11             div
12             {
13                 height: 1in;
14                 width: 1in;
15             }
16             #div1
17             {
18                 background: orange;
19             }
20             #div2
21             {
22                 visibility: hidden;
23             }
24             div div
25             {
26                 background: red;
27                 visibility: inherit;
28             }
29             #div3
30             {
31                 background: blue;
32             }
33         </style>
34     </head>
35     <body>
36         <p>Test passes if the blue and orange boxes below are not touching and there is no red visible on the page.</p>
37         <div id="div1"></div>
38         <div id="div2">
39             <div>FAIL FAIL</div>
40         </div>
41         <div id="div3"></div>
42     </body>
43 </html>