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

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
inline-block.

~TJ

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