W3C home > Mailing lists > Public > www-style@w3.org > July 2012

[CSS21] border-collapse with rowspan or colspan

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Tue, 10 Jul 2012 12:53:17 +0200
Message-ID: <4FFC099D.4070207@kozea.fr>
To: WWW Style <www-style@w3.org>
Hi,

The collapsing border model for tables is not well-defined and not 
interoperable in presence of cells with colspan or rowspan > 1.

Test case:

http://dabblet.com/gist/3082417

     <style>td { padding: 10px }</style>
     <table style="border-collapse: collapse; margin: 50px">
       <tr style="border: 1px solid blue">
         <td rowspan=2>A</td>
         <td>B</td>
       </tr>
       <tr style="border: 20px solid red">
         <td>C</td>
         <td>D</td>
       </tr>
     </table>

WebKit, Gecko and Opera give three different renderings, none obviously 
better (to me) than the others. The only consistent detail is that cells 
(with rowspan or colspan) never have borders inside.

However, the problematic cases are not very interesting so I suggest 
leaving this undefined until someone wants to make css3-tables in a few 
decades. Maybe add a note in CSS 2.1 saying explicitly that this is 
undefined.

In the meantime, Iíll do whatever is more convenient in WeasyPrint.

Regards,
-- 
Simon Sapin
Received on Tuesday, 10 July 2012 10:53:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:56 GMT