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

Re: [css3-flexbox] We need a BFC for "intended-to-be-replaced" flex items like <object>, <img>

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 21 May 2012 17:35:01 -0700
Message-ID: <CAAWBYDBwB1sJiBeGn1A_r5fyghHd_aAWL7G4u9Q3MD-qPFtGeg@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style list <www-style@w3.org>
On Mon, May 21, 2012 at 2:48 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> Hi www-style,
> I believe the new "elements that want to be replaced will form flex
> items" magic is still unclear on (at least) one thing.
> ( ED spec reference: http://dev.w3.org/csswg/css3-flexbox/#flex-items )
> Consider this content, where the <object> doesn't load anything, which
> makes it render its contents (naked text in this case):
>  <div style="display: flex>
>   <object>
>     This is a paragraph of text.
>     [...]
>     Here ends the paragraph of text.
>   </object>
>  </div>
> Presumably we'd expect these characteristics:
>  (1) If we add style="width: 100px" on the <object>, it should honor
> that width, just as any other flexbox item would.
>  (2) If we add style="height: 100px" on the <object>, it should honor
> that height, just as any other flexbox item would.
>  (3) The <object>'s box should line-wrap its contents (in this case, a
> paragraph of text), as if it were a block.
> However -- since the <object> is display:inline (by default), it will
> actually generate an inline-level box, which won't have any of the above
> characteristics.  That's bad.

You're missing the paragraph at the end of section 4.0:

# The computed value for ‘display’ for elements that
# are flex items must be determined by applying the
# table in CSS 2.1 Chapter 9.7.

This means that the final contents of the <object> will actually be

Received on Tuesday, 22 May 2012 00:36:10 UTC

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