W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: percentage heights in tables (section 17.5.3 of the CSS2.1 spec on "table height algorithms")

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 17 Mar 2010 07:05:56 -0700
Message-ID: <dd0fbad1003170705t24e260c9xaf62ccdc4a90217e@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Peter Moulder <Peter.Moulder@infotech.monash.edu.au>, sam <samuelp@iinet.net.au>, www-style@w3.org
On Wed, Mar 17, 2010 at 12:03 AM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> --------------------------------------------------
> From: "Tab Atkins Jr." <jackalmage@gmail.com>
> Sent: Tuesday, March 16, 2010 6:34 PM
> To: "Peter Moulder" <Peter.Moulder@infotech.monash.edu.au>
> Cc: "sam" <samuelp@iinet.net.au>; <www-style@w3.org>
> Subject: Re: percentage heights in tables (section 17.5.3 of the CSS2.1 spec
> on "table height algorithms")
>
>>> The main point is that it does add more implementation effort than you'd
>>> expect, and at the moment I believe there are still more significant
>>> issues
>>> with tables both in the spec and in the extent to which the table spec is
>>> implemented in common CSS user agents, so I would expect percentage row
>>> heights
>>> to be widely implemented soon.
>>
>> I assumed that it would follow the standard rules for percentage
>> heights, in that, say, percentage row heights would only 'work' if the
>> table had a *definite* height.  It wouldn't try to infer what the
>> percentage would have to mean based on other row heights.  Essentially
>> it would work exactly as if the table elements had normal, non-table-*
>> display types.  Then the value obtained from that calculation would be
>> fed into the standard table row/cell height calculations.
>>
>
> That’s me and flex units [1] again.  In some conditions in tables "HTML
> percents" behave
> differently than "CSS percents".
>
> Consider this sample:
>
> <html>
> <body>
> <table border="1" cellpadding="1" cellspacing="10" width="100%"
> height="100%">
>  <tr><td>1</td></tr>
>  <tr height="100%"><td height="100%">2</td></tr>
>  <tr><td>3</td></tr>
> </table>
> </body>
> </html>
>
> The only way to translate such percents to CSS is to introduce flex units in
> CSS.  No other way so far.
> All 100% here are precisely 1*;
>
> As I said many times already that in 99% of cases when people are asking for
> better percents in CSS
> they are asking for flexes.
>
> Sorry for boring persistence.
>
> [1] http://www.terrainformatica.com/w3/flex-layout/flex-layout.htm

No, I agree that flex units are likely useful, and that tables act as
if they had some form of flex unit.  It's simply (hah!) a matter of
specifying all the myriad ways they can interact with the existing
layout models.

~TJ
Received on Wednesday, 17 March 2010 14:06:49 GMT

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