[css3-flexbox] issue 10: absolute-positioned flexbox items

± -----Original Message-----
± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
± Sent: Monday, July 18, 2011 1:24 PM
± 
± On Sun, Jul 17, 2011 at 10:06 PM, Alex Mogilevsky <alexmog@microsoft.com>
± wrote:
± > Issues in the spec that I didn't put in wiki:
± >
± >        ▶ Note that out-of-flow elements like absolutely positioned
± > elements
± >        leave behind a ‘placeholder’ inline element in their original
± > position
± >        in the document Issue:(ISSUE: This will be defined in
± > Positioned Layout.)
± >
± > I don't think it's an issue. It is defined more or less clear in CSS2.1
± what is auto position of absolute positioned elements. If auto position
± needs special definition for flexbox, it belongs to flexbox spec (but I
± don't think there is anything undefined there; clarification might help).
± 
± 2.1 doesn't define that abspos elements leave behind a placeholder, which
± is then treated like a 0x0 inline element.  This is important for display
± types that wrap inappropriately-displayed items, like display:table or
± display:flexbox.
± 
± In other words, doing this:
± 
± <div display:flexbox>
±   <div>foo</div>
±   <div position:absolute>bar</div>
±   <div>baz</div>
± </div>
± 
± ...should create a flexbox with three flexbox items - the 'foo' and 'baz'
± elements, and an anonymous block wrapping the placeholder for 'bar'.
± 
± The anonymous block is *mostly* invisible, but it'll create a rendering
± difference when you use flex-pack:justify (it'll look like there's a
± double-width space there).

I have added this as issue 10. http://wiki.csswg.org/spec/css3-flexbox#issue-10 

I think there is more than one way to treat out-of-flow children. What you are describing is reasonable and consistent with 2.1 (and it's what I plan to do when I add support for anonymous flexbox children). Another possibility however is to not leave a placeholder, but only use the hypothetical block and hypothetical line to determine auto position. It is also consistent with the concept of positioned content being completely removed from flow, and may actually be better behavior.

Received on Monday, 18 July 2011 21:02:45 UTC