Re: [css3-flexbox] anonymous flexbox children

On Mon, Feb 7, 2011 at 10:46 AM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> Flexbox spec requires that non-block content is wrapped into anonymous blocks which become anonymous flex items. This is apparently designed to follow the philosophy that no content is ignored by layout which sounds very reasonable.
>
> I'd like to clarify what exactly should be considered an anonymous block there. It may be different from how anonymous blocks are formed in text flow.

[snip]

> The important difference from anonymous blocks in text is that div "11" which is a block inside an inline element is not considered a separate item for flexbox layout, because it is not a direct child of a flexbox.
>
> It is possible to define anonymous block creation in other ways. My preference is the way shown above, as opposed to more inclusive models that could allow elements participating in flexbox layout to transcend element tree structure. That is possible to but it would complicate both implementation ant the spec, and I don't see any practical reason for that being necessary.
>
> What do you think?

I'm happy to go with whichever one implementors like.  Obviously we
know which way your vote is cast.  ^_^

I find this analogous to the table-repair algorithms.  Consider this:

<div .table>
  <div .table-cell></div>
  <span .table-cell></span>
  <span>
    <div .table-cell></div>
  </span>
</div>

This markup should create three cells, not five, right?  Flexboxes
should work the same way.

~TJ

Received on Monday, 7 February 2011 19:28:16 UTC