RE: [CSS21] percentage table row heights

IE also tries to honor the percentage. There are differences between all browsers in certain scenarios.

Please see attached mail where I tried to get a clarification sometime back.

'Undefined' would be fine with us for CSS2.1.

Thanks,
Saloni

-------------------------------------
Saloni Mira Rai
IE Developer Experience PM
425-421-8505


-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of fantasai
Sent: Tuesday, June 24, 2008 1:06 PM
To: www-style@w3.org
Subject: [CSS21] percentage table row heights


http://lists.w3.org/Archives/Public/public-css-testsuite/2008Jun/0014.html
   # Percentage heights on table cells, table rows, and table row
   # groups compute to 'auto'.

Robin Pelgrim posted a testcase that shows several browsers
do not treat percentage row heights as 'auto'.

   http://lists.w3.org/Archives/Public/public-css-testsuite/2008Jun/0014.html
   http://lists.w3.org/Archives/Public/www-archive/2008Jun/att-0146/table-row-percent-height.html

I've tested Opera 9.27, Firefox 3, and Konqueror 3.5.9 so far,
all of them try to honor the percentage somehow.

Should percentages on row heights be undefined in CSS2.1
instead of treated as 'auto'?

~fantasai

Forwarded message 1

  • From: Saloni Mira Rai <salonir@microsoft.com>
  • Date: Thu, 20 Mar 2008 17:20:49 -0700
  • Subject: Table height distribution
  • To: "www-style@w3c.org" <www-style@w3c.org>
Hello,

I have a question about expected behavior for table height distribution.
The CSS 2.1 spec Section 17.5.3 says "CSS 2.1 does not define how extra space is distributed when the 'height' property causes the table to be taller than it otherwise would be".
Also, in the next paragraph, it says " Percentage heights on table cells, table rows, and table row groups compute to 'auto'."


However, none of the browsers use 'auto' on rows with % height.
The attached file shows how each browser behaves differently across various cases.

CASE 1 - Table height is specified and larger than the sum of the MAX(specified row height, min cell height). The height of the row content can be greater or smaller than the specified row height and it makes no difference to the outcome.
IE7, FF2, Opera, Safari - Distribute extra space proportionally to all rows
FF3 - Distribute extra space evenly to all rows

CASE 2 - Table height is specified and larger than the sum of the MAX(specified row height, min cell height). Row heights are specified using %values.
IE7, FF2, Opera, Safari - Distribute extra space proportionally to all rows
FF3 - Distribute extra space evenly to all rows.

CASE 3 - Same as CASE 2, however in this case the sum of the rows is GREATER than the table height.
IE7 - Increases table height to accommodate computed values Opera - Reduce row heights proportionally based on % height FF2, FF3, Safari - Respect the minimum row height and sacrifice the % height of later rows.

CASE 4 - Table height is larger than sum of row heights. First two rows are auto, and next two are defined using %.
IE7 - Distribute extra space _proportionally_ to *all* rows FF2, FF3, Opera - Distribute the extra space _proportionally_ between the *auto* rows.
Safari - Distribute extra space _evenly_ to *auto* rows

CASE 5 - Similar to CASE 4 but table height is smaller.
IE7 - Increase table height
FF2, Safari - Respect the minimum row height and sacrifice the % height of later rows FF3, Opera - reduce the row height proportionately



What is the preferred behavior here? Do people think table height be distributed (or reduced) proportionally, evenly, or from a single row?

Thanks,
Saloni

Received on Tuesday, 24 June 2008 21:04:20 UTC