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

[css-flexbox] new abspos logic

From: Christian Biesinger <cbiesinger@google.com>
Date: Wed, 8 Apr 2015 21:25:11 -0400
Message-ID: <CAPTJ0XF7SOED3JRVRgqkMs4gYgbMMet2Ht4Lu7ZU3GVZHxTFbw@mail.gmail.com>
To: www-style list <www-style@w3.org>
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).

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)...


This new method is way more complex than the previous one :(

-christian
Received on Thursday, 9 April 2015 01:25:39 UTC

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