Re: [css3-flexbox] what's the rendering of floated content *inside of a span*?

On Wed, Jan 25, 2012 at 2:47 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> One last float-handling question...
>
> What's the expected behavior of content like this, with a floated element
> *inside* a to-be-wrapped run of inline stuff:
>  <div style="display:flexbox">
>    <span>I am a span<div style="float:left">floated div</div></span>
>  </div>
>
> My initial expectation is that the entire <span> gets wrapped in an
> anonymous block, and the floated div floats to the left of *that* block.
>  (like "item6.1" in the current Editor's Draft, but with the div floating to
> the left of its wrapper)
>
> However, I could perhaps see the <div> first being taken out-of-flow
> (reparented to the flexbox, leaving a placeholder behind in the <span>) and
> being turned into its own flexbox item, or something wacky like that...  I'm
> not sure whether that or my initial expectation is more correct/sensible.

Following the convention of #item6.1 in Example 2, the span should be
wrapped in an anonymous flexbox item.  Floats don't reparent in the
box-tree - the float is still a child of the <span>, it just has
special rules for layout.

~TJ

Received on Wednesday, 25 January 2012 22:56:30 UTC