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

[css3-flexbox] flex-align:stretch on absolutely positioned items WAS: Changing abspos placeholders to atomic inlines

From: Ojan Vafai <ojan@chromium.org>
Date: Fri, 25 May 2012 20:54:57 -0700
Message-ID: <CANMdWTuCN668E5hZPc-SPwYfjxrqMBjpKSfqFvYWxfssrrYtFw@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
On Mon, May 21, 2012 at 5:43 PM, fantasai <fantasai.lists@inkedblade.net>wrote:

> On 05/21/2012 02:38 PM, Tab Atkins Jr. wrote:
>
>> On Sun, May 20, 2012 at 2:36 AM, Anton Prowse<prowse@moonhenge.net>
>>  wrote:
>>
>>> On 18/05/2012 02:44, Tab Atkins Jr. wrote:
>>>
>>>> Issue link: http://wiki.csswg.org/topics/**
>>>> css3-flexbox-abspos-flex-items<http://wiki.csswg.org/topics/css3-flexbox-abspos-flex-items>
>>>>
>>>> Previously, the "placeholder" left behind by abspos items was defined
>>>> to be a "0x0 anonymous inline".  Anton raised the issue that setting
>>>> an inline to 0 height doesn't really do anything, and we may instead
>>>> want to set its line-height to 0.  Instead, fantasai and I decided to
>>>> just change them to atomic inlines.  This makes the 0 height actually
>>>> matter.
>>>>
>>>> This has additional implications, though.  As an atomic inline, the
>>>> placeholder now becomes a flex item, rather than being wrapped in a
>>>> flex item.  This actually seems like slightly better behavior, as it
>>>> means that it responds directly to flex-align.
>>>>
>>>
>>> I think that works, but I'm not seeing the connection to 'flex-align';
>>> would
>>> you mind elaborating?
>>>
>>
>> The effect actually isn't as large as I previously thought.  The
>> effects of 'flex-align' on an anonymous block around the placeholder
>> end up being about the same as applying them the placeholder itself.
>> Possibly identical, but I'm not certain off the top of my head.  It
>> may be simply that the only observable effect is to make two abspos
>> elements next to each other still take up two "spots" for the purpose
>> of flex-pack:justify and such.
>>
>
> Yeah, the only observable effect would for those 'flex-pack' values.
>
> This change makes the behavior of placeholders more explainable imo.
> Each abspos placeholder individually acts as a zero-width flex item,
> so two of them will no longer glom together as one, nor will they
> be scooped up into a run of inlines.


It's not clear to me with this change (or with the current spec text) what
should happen with flex-align/align-items: stretch on absolutely positioned
flex items. WebKit's current implementation happens to ignore stretch, but
that's not intentional. I can't really think of use-cases for wanting to
stretch absolutely positioned items, except if you're trying to overlay one
item on top of the other.

Ojan
Received on Saturday, 26 May 2012 03:55:48 GMT

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