table-layer-transparency-example-001

Empty cells set to 'hide' are transparent down to the table background

WeasyPrint

This browser

Assertion
If 'empty-cells' is set to 'hide', empty cells are transparent all the way down to the table background, (example from spec section 17.5.1).

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 set to 'hide' are transparent down to the table background</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#table-layers">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="If 'empty-cells' is set to 'hide', empty cells are transparent all the way down to the table background, (example from spec section 17.5.1).">
 9         <style type="text/css">
10             table
11             {
12                 background: #ff0;
13                 border: solid black;
14                 empty-cells: hide;
15             }
16             tr.top
17             {
18                 background: orange;
19             }
20             td
21             {
22                 border: 2px solid black;
23             }
24         </style>
25     </head>
26     <body>
27         <p>Test passes if the table below has two rows of cells with black borders, cell '2' spans both rows, and cells '1', '2', '3', '4' have a orange background. There cannot be any visible cells below cells '3' or '4'.</p>
28         <table>
29             <tr class="top">
30                 <td> 1</td>
31                 <td rowspan="2"> 2</td>
32                 <td> 3</td>
33                 <td> 4</td>
34             </tr>
35             <tr>
36                 <td> 5</td>
37                 <td></td>
38             </tr>
39         </table>
40   </body>
41 </html>