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

On 05/15/2012 05:20 PM, Tab Atkins Jr. wrote:
> 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.

What you want for justify depends on whether you were going for a symmetric
effect or for an edge-alignment effect, but I suppose what you have makes
sense for the edge-alignment case. :)

~fantasai

Received on Wednesday, 16 May 2012 22:42:46 UTC