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

Re: [css3-flexbox] fallback alignment of justify/distribute

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 15 May 2012 17:20:25 -0700
Message-ID: <CAAWBYDCd8oBqD7cOroq5C234d6qdgz+eetY00SNpmbUc72Vx7w@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, May 15, 2012 at 5:05 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> Currently Flexbox has two modes for "justifying" items and lines within
> their containers:
>
>  * align first and last box to container edges, space out the ones in
> between
>  * space them all out evenly
>
> Question A is, what happens when there's only one item? Should it center or
> start-align?
> (The spec says different things for each one, which seems silly.)

There's good reason for that.  In "justify", the first item is
*always* against the start edge.  It seems weird to have that change
when you have only a single item.

On the other hand, in "distribute" we put space before, after, and
between every item.  Items *never* touch the edges unless there's no
space left over.  It similarly seems weird to have that change when
you have only a single item.

> Question B is, what happens when the content overflows? Should it center or
> start-align?

It seemed consistent to make it act the same as the single-item case.

~TJ
Received on Wednesday, 16 May 2012 00:21:14 GMT

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