- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 22 Jan 2009 15:26:39 -0800
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: www-style@w3.org
Boris Zbarsky wrote:
>
> > So, would a rule 4½ added to the anonymous box generation rules
> > http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes
> > that states
> >
> > 4½. If a child T of a 'table', 'inline-table', 'table-row-group',
> > 'table-header-group', 'table-footer-group', or 'table-row' box
> > is an anonymous inline box that contains only white space, then
> > it is treated as if it has "display: none".
> >
> > solve the problem?
> >
> > ~fantasai
>
> OK, I'm looking at this again. This might solve the problem but
> requires either various lookahead when constructing the rendering tree
> or creating, analyzing, and then possibly (and in fact probably)
> destroying rendering objects. Further, it requires all this in the
> common case (HTML tables).
>
> And I'm not even sure whether it solves the problem, because I can't
> tell, by reading this rule, what the correct box tree is for:
>
> <div style="display: table-row">
> <span>AAA</span>
> <span>BBB</span>
> </div>
>
> Is there a space between the "AAA" and "BBB" or not?
Good point. The intent was for all consecutive boxes that are not an
internal table-* box to be considered as one unit. And if that unit is
composed entirely of white space then it is dropped. So that example
should generate a single table-cell just inside the table-row and,
probably, preserve all whitespace inside. Certainly it should preserve
the space between the two spans. So perhaps the intent is more closely
expressed by adding
| 8. Any anonymous table-cell, table-row, table-row-group, table-header-group
| or table-footer-group whose contents are only anonymous boxes
| containing only white space are treated as if they had "display: none".
But that doesn't solve your lookahead problem there.
Can I get a bug #?
> The more I look at this section and think about implementing it, the
> more poorly-thought-out it seems. So I would like to propose alternate
> anonymous box generation rules (loose phrasing; can write up formally if
> desired):
>
> 1) Suppress all "misnested" boxes except 'table-row' inside 'table'.
> 2) Wrap runs of 'table-row' inside 'table' in a 'table-row-group'
> (needed to deal with XHTML's not requiring a <tbody>).
>
> It feels like this would be much simpler to implement. Interoperability
> on this section is already quite poor, so making this change might
> actually get us to CR faster. The only question is whether it'll cause
> website compat issues.... Are sites relying on the
> currently-interoperable behavior? If so, can we loosen the "suppress
> everything" condition enough to allow those sites to keep operating
> while still keeping the overall thing somewhat sane?
I agree with Tab,
<ul style="display: table">
<li style="display: table-cell"/>
<li style="display: table-cell"/>
</ul>
needs to work.
~fantasai
Received on Thursday, 22 January 2009 23:27:25 UTC