border-conflict-element-020

Border Conflict Resolution (by element): row group vs. row - element with highest priority is the dominant border

WeasyPrint

This browser

Assertion
With adjacent elements (row group, row) of same border-style and width, border collapsing favors the row.

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: Border Conflict Resolution (by element): row group vs. row - element with highest priority is the dominant border</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#border-conflict-resolution">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="With adjacent elements (row group, row) of same border-style and width, border collapsing favors the row.">
 9         <style type="text/css">
10             table
11             {
12                 border-collapse: collapse;
13                 height: 2in;
14                 width: 2in;
15             }
16             #test
17             {
18                 border-bottom: 5px solid red;
19                 border-top: 5px solid red;
20             }
21             .winning
22             {
23                 border-bottom: 5px solid black;
24                 border-top: 5px solid black;
25             }
26             td
27             {
28                 border-left: 5px solid black;
29                 border-right: 5px solid black;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if there is no red visible on the page.</p>
35         <table>
36             <tbody>
37                 <tr class="winning">
38                     <td></td>
39                 </tr>
40             </tbody>
41             <tbody id="test">
42                 <tr>
43                     <td></td>
44                 </tr>
45             </tbody>
46             <tbody>
47                 <tr class="winning">
48                     <td></td>
49                 </tr>
50             </tbody>
51         </table>
52     </body>
53 </html>