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

[css3-flexbox] issue 11: wrapping rules for anonymous items

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Mon, 18 Jul 2011 21:16:46 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E5398569284120A6A79@TK5EX14MBXC214.redmond.corp.microsoft.com>
± -----Original Message-----
± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] 
± Sent: Monday, July 18, 2011 1:24 PM 
± Given the following markup:
± <div display:flexbox>
±   <span>
±     foo
±     <div>bar</div>
±     baz
±   </span>
± </div>
± ...do you get 1 or 3 flexbox items?  Whether you're operating on the box- 
± tree or the element-tree changes the answer.  In the element-tree, the 
± algorithm sees a single inline child, and creates a single anonymous 
± wrapper block.  In the box-tree, the algorithm sees an anonymous block 
± box, the <div>'s block box, then another anonymous block box, for a total 
± of three items.
± You can detect the difference again with flex-pack:justify.
± Note that all browsers agree that table-fixup either operates on the 
± element-tree (after pseudo-element creation) or on the box-tree before 
± block-in-inline fixup (I can't figure out how to distinguish the two).
±  Flexbox should be consistent.

Added to wiki: http://wiki.csswg.org/spec/css3-flexbox?&#issue-11

I think your example should produce 1 flexbox item. Anonymous blocks contained within an inline element could be treated as separate items, but it makes a lot of things more complicated. I would very much prefer that anonymous flexbox items don't cross element boundaries.

Received on Monday, 18 July 2011 21:17:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:47 UTC