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

Re: [css3-flexbox] Baseline of flexboxes and flexbox items

From: Morten Stenshorne <mstensho@opera.com>
Date: Tue, 17 Apr 2012 00:12:19 +0200
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style@w3.org
Message-ID: <8762cz9vi4.fsf@aeneas.oslo.osa>
"Tab Atkins Jr." <jackalmage@gmail.com> writes:

> The baseline of a flexbox item is just whatever their display type
> says it should be (there's no "flexbox item" display type).

That would mean that a flexbox item with e.g. display:block and a
flexbox item with display:inline-block would get their baselines
calculated differently (first line vs. last line). Do we really want
that?

Let me try to explain how I see flexboxes together with the rest of
the universe:

Let's pretend that we have the display-outside and display-inside
longhand properties [1] that comprise a 'display' shorthand
property. Then, a flexbox item sort of gets its display-outside part
of the display value replaced with, say, an imaginary value
"flexbox-item" and that only the display-inner part is kept as
specified.

After all, a flexbox item is neither inline-level nor block-level, is
it? Therefore, making a distinction between inline-level and
block-level display types is rather pointless. I'm thinking that a
flexbox item with display:inline-table should give the exact same
layout as with display:table, a flexbox item with display:inline-block
should give the exact same layout as with display:block, and a flexbox
item with display:inline-flexbox should give the exact same layout as
with display:flexbox.

Perhaps, rather than using display-inner and display-outer to
illustrate what I mean, I could use the table in CSS 2.1 chapter 9.7
[2]. I was thinking that flexbox items should modify the 'display'
property according to that table (and additionally set 'float' to
'none').

Now, the flexbox spec doesn't say that the computed 'display' and
'float' values should be modified for flexbox items, but to me it
suggests that the layout engine should behave as if they did (and that
makes sense to me).

[1] http://lists.w3.org/Archives/Public/www-style/2010Apr/0418.html
[2] http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo

-- 
---- Morten Stenshorne, developer, Opera Software ASA ----
---- Office: +47 23693206 ---- Cellular: +47 93440112 ----
------------------ http://www.opera.com/ -----------------
Received on Monday, 16 April 2012 22:13:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT