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

Re: [css-flexbox] abspos & align-self: stretch

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 26 Apr 2016 11:52:04 -0700
Message-ID: <CAAWBYDAEG8NWdTDsAKRr0oTSsfr+X54fR34t-G+sqGvORa+D6g@mail.gmail.com>
To: Christian Biesinger <cbiesinger@google.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, Greg Whitworth <gwhit@microsoft.com>, www-style list <www-style@w3.org>
On Mon, Apr 25, 2016 at 4:26 PM, Christian Biesinger
<cbiesinger@google.com> wrote:
> On Mon, Apr 25, 2016 at 4:03 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>> On 04/22/2016 12:56 AM, Tab Atkins Jr. wrote:
>>>
>>> On Thu, Apr 21, 2016 at 2:39 PM, Christian Biesinger
>>> <cbiesinger@google.com> wrote:
>>>>
>>>> For align, it's only align-items/align-self, but not align-content.
>>>> Tested in Edge 20.10240.16384.0
>>>>
>>>> For justify it is justify-content as you say.
>>>
>>>
>>> Ah, right, align-content happens to not have an effect, because the
>>> abspos is treated as being the only flex item, so the flexbox is
>>> single-line for these purposes, and the flex line is stretched to the
>>> size of the flexbox (so there's no free space to align the flex line
>>> with).
>>
>>
>> Whether a flex container is single-line or multi-line depends
>> on its flex-wrap property, not on how many items there are.
>
> Hm, so, am I understanding you right that the desired effect is the
> following (again, for abspos children of flex containers):
>
> - If flex-wrap: nowrap:
>   Align items per align-items, ignore align-content
> - If flex-wrap: wrap or wrap-reverse:
>   Ignore align-items (because the size of the line is the size of the
> flex item), align per align-content.
>   Unless align-content is stretch and cross-size is definite, then use
> align-items.
>
> Right...?

The right behavior per spec is to just do *precisely* what a lone flex
item would do.

~TJ
Received on Tuesday, 26 April 2016 18:53:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:38 UTC