- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Wed, 17 Mar 2010 00:03:05 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>, "Peter Moulder" <Peter.Moulder@infotech.monash.edu.au>
- Cc: "sam" <samuelp@iinet.net.au>, <www-style@w3.org>
-------------------------------------------------- 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 -- Andrew Fedoniouk http://terrainformatica.com
Received on Wednesday, 17 March 2010 07:03:35 UTC