W3C home > Mailing lists > Public > www-style@w3.org > February 2004

Re: [CSS2] More on tables

From: Bernd <bernd_mozilla@gmx.de>
Date: Tue, 10 Feb 2004 19:05:06 +0100
Message-ID: <40291D52.8000606@gmx.de>
To: Ian Hickson <ian@hixie.ch>
Cc: www-style@w3.org

> Why? The only reason visibility:collapse cell still affect layout is for
> optimisation, as I understand it. In the empty-cells case, it doesn't
> apply, since the change won't be done dynamically in the same way.
> 
> 
> 
>>WinIE, Opera, and Mozilla all have this interpretation.
> 
> 
> They should be fixed.
> 
> If UAs don't implement this right, the spec will have to change before
> exiting CR.

I think the best thing that could be done is to remove the line:
"Furthermore, if all the cells in a row have a value of 'hide' and have 
no visible content, the entire row behaves as if it had 'display: none'."
By this Opera and Mozilla will be two interoperable implementations with 
respect to empty-cells. A page author can furhtermore achieve cross 
browser (with respect to winIE) working pages by setting empty-cells:hide .

If this is not possible then
if understand you correct you would like to require browsers to render 
the table in the following testcase to be certainly smaller than 400px wide.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head> <meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1">

   <title>empty cells in a tr</title>
	<style type="text/css">
	table { border:solid black 1px; empty-cells:hide; border-spacing:2px}
        td {border:solid black 1px;padding:0;}
        .w1 {width:200px}	
       </style>	
</head>
<body>
<table>
<tbody>
<tr><td>foo</td><td class="w1">bar</td></tr>
<tr><td class="w1"></td><td></td></tr>
</tbody>
</table>
</body>
</html>

see the testcase at 
http://people.freenet.de/bernd_mozilla/empty_cells_row.html .  It would 
be reasonable easy to implement the visibilty:collapsed scenario, that 
fantasai described because it will happen once the reflow is done and 
the size of the table cells and rows is known and can be merged with the 
visibility:collapsed handling. The display:none scenario is much more 
difficult, it would require a relayout, but one could not simply change 
the rows display type to none because on the next reflow other frames 
might be added to the cell, which would not happen if the row had a true 
display:none type. Furthermore it would only change the visibility but 
not the layout of the table and remove the exception in your comment ( 
http://lists.w3.org/Archives/Public/www-style/2004Jan/0228.html ).


> So basically, you are asking "does empty-cells affect layout".
> 
> The spec doesn't say that it does (except in one specific case) so the
> working group's conclusion is that it does not. 

Bernd
Received on Tuesday, 10 February 2004 13:05:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:26 GMT