visibility-001

Visibility set to 'collapse'

WeasyPrint

This browser

Assertion
A block with 'visibility' set to 'collapse' will not be rendered on the page but will still affect layout flow.

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 'collapse'</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 with 'visibility' set to 'collapse' will not be rendered on the page but will still affect layout flow.">
10         <style type="text/css">
11             div
12             {
13                 background: green;
14                 width: 1in;
15             }
16             div div
17             {
18                 height: 1in;
19             }
20             #div1
21             {
22                 background: red;
23                 visibility: collapse;
24             }
25             #div2
26             {
27                 background: blue;
28             }
29         </style>
30     </head>
31     <body>
32         <p>Test passes if there is a green box above a blue box below.</p>
33         <div>
34             <div id="div1">FAIL FAIL</div>
35             <div id="div2"></div>
36         </div>
37     </body>
38 </html>