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

Re: inline-block baseline

From: Ojan Vafai <ojan@chromium.org>
Date: Thu, 4 Oct 2012 11:26:57 -0700
Message-ID: <CANMdWTvEfnCgN4hhSqcGQRgOTXj0Hi7h2XYCY_csgW0J4UQvpg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Tony Chang <tony@chromium.org>, "www-style@w3.org" <www-style@w3.org>
On Thu, Oct 4, 2012 at 11:08 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Oct 4, 2012 at 11:02 AM, Tony Chang <tony@chromium.org> wrote:
> > What is the baseline of an inline-block with a flexbox in it?  I see 3
> > possibilities:
> >
> > 1) The baseline is the last line box in the flexbox.  This seems to be
> what
> > the last sentence here says: http://www.w3.org/TR/CSS21/visudet.html
> >
> > 2) The baseline is the bottom of the flexbox.  This would match the
> behavior
> > of tables.  Example: http://jsfiddle.net/84FRJ/
> >
> > 3) The baseline is the baseline of the flexbox.
> >
> > This came up in WebKit because the <input type="month"> picker uses a
> > horizontal flexbox to hold the date components and center them
> vertically.
> > If the expected behavior is 1 or 3, the input will baseline align
> > automatically so I would probably lean towards either of those.  I'm not
> > sure what use cases there are to prefer one over the other.
>
> I don't think that baseline-determination should reach farther than
> necessary.  Since a flexbox knows what its baseline is, I think the
> inline-block should just use that.
>

That's fine. Assuming other implementors are OK with it, it needs to be
specced somewhere. Looking at CSS2.1, it wasn't clear that this is correct.


> ~TJ
>
>
Received on Thursday, 4 October 2012 18:27:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT