W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: [css3-flexbox] anonymous flexbox children

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 7 Feb 2011 11:27:23 -0800
Message-ID: <AANLkTi=dkiLzJ67VoUUkuJqPq+meAP1CSqQ9kn8yu0pw@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: www-style list <www-style@w3.org>
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 GMT

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