W3C home > Mailing lists > Public > www-style@w3.org > January 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 25 Jan 2012 14:55:36 -0800
Message-ID: <CAAWBYDADwyP8dnh9pUsmDfy3dnD8AWZ4mSE4zMi1rYjvCMEGnw@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: "www-style@w3.org list" <www-style@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:10 UTC