empty-cells-applies-to-016

Empty-cells and 'display: none' elements

WeasyPrint

This browser

Assertion
Empty-cells does not apply to 'display: none' elements.

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: Empty-cells and 'display: none' elements</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#propdef-empty-cells">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#empty-cells">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="Empty-cells does not apply to 'display: none' elements.">
10         <style type="text/css">
11             #table
12             {
13                 display: table;
14             }
15             .tr
16             {
17                 display: table-row;
18             }
19             .td
20             {
21                 color: white;
22                 display: table-cell;
23             }
24             #test
25             {
26                 background: red
27                 border: 5px solid red;
28                 display: none;
29                 empty-cells: hide;
30                 height: 1em;
31                 width: 1em;
32             }
33         </style>
34     </head>
35     <body>
36         <p>Test passes if there is no red visible on the page.</p>
37         <div id="table">
38             <div class="tr">
39                 <div id="test"></div>
40                 <div class="td">XXXXX</div>
41             </div>
42             <div class="tr">
43                 <div class="td">XXXXX</div>
44                 <div class="td">XXXXX</div>
45             </div>
46         </div>
47     </body>
48 </html>