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

Re: [css-flexbox] new abspos logic

From: Christian Biesinger <cbiesinger@google.com>
Date: Tue, 5 May 2015 19:32:54 -0400
Message-ID: <CAPTJ0XFQAMx1Xbp1CbXAM5w=yqN19NyPFsx6eXXxFgzmzgfbEw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Thanks for the explanations. I feel like 9.1 (.0) should not say
"Absolutely-positioned children of a flex container do not participate
in flex layout" anymore, because they kind of do, just in a special
way. Maybe make that say "Absolutely-positioned children of a flex
container participate in flex layout according to section 4.1 only".

-christian

On Tue, May 5, 2015 at 7:15 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Wed, Apr 8, 2015 at 6:25 PM, Christian Biesinger
> <cbiesinger@google.com> wrote:
>> More questions on http://dev.w3.org/csswg/css-flexbox/#abspos-items -
>>
>> So the spec says:
>> "In other words, the static position of an absolutely positioned child
>> of a flex container is determined after flex layout by setting the
>> child’s static-position rectangle to the flex container’s content box,
>> then aligning the absolutely positioned child within this rectangle
>> according to the justify-content value of the flex container and the
>> align-self value of the child itself"
>>
>> I'm not completely sure how to interpret that especially in the case
>> of auto margins. For example, given align-self: flex-end but margin:
>> auto 0. Am I supposed to take a similar approach to the flex algorithm
>> and ignore the flex-end here (because the margins centered it)...? Or
>> should I ignore the margins and align it to flex-end because that
>> matches this text more closely, even though it seems to contradict the
>> previous paragraph a bit (which implies that only the static position
>> is affected).
>
> I've removed that paragraph.  It's just trying to rephrase the
> previous paragraph, but it's doing so badly.  The previous paragraph
> gives the correct behavior - treat it like it's a lone flex item and
> do normal flex alignment (with all sizes fixed, so only alignment
> occurs).  This really just means that, depending on margins and
> alignment properties, it'll be start/center/end in each axis of the
> flexbox's content box, but the more general text is easier to define
> and handles any future values we add to the alignment properties
> correctly.
>
>> In fact, a strict reading of the quoted paragraph implies that
>> align-self/justify-content override other alignment methods (e.g.
>> top:0 bottom:0)...
>
> No it doesn't; this is defining the static position.  The static
> position doesn't take top/etc into account, and isn't used when
> top/etc are non-auto.
>
> ~TJ
Received on Tuesday, 5 May 2015 23:33:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC