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

[css3-flexbox] absolutely positioned flexbox items

From: Tony Chang <tony@chromium.org>
Date: Wed, 4 Jan 2012 11:42:33 -0800
Message-ID: <CAL-=4P0PePNXE8wT0gaBx7DfpgQro6WN8_EN-SaB+KWB=tUD9A@mail.gmail.com>
To: www-style@w3.org
I have some questions about the static position of position:absolute flex

The spec says, "If the element has two neighbors, its static position in
the main axis is exactly in the center of the packing space between them
when the flexbox is actually laid out."  This seems to only matter for
flex-pack:justify (the only way there's packing space between items), but
why the middle?  It's not hard to implement, but I wasn't sure what the use
case is. I would expect the static position to just be immediately after
the previous flex item.  E.g.:

|aaa bbb        ccc|

Where bbb is a position:absolute flex item and aaa and ccc are flex items
that are being positioned by flex-pack:justify.  The spec would do
something like:

|aaa      bbb   ccc|

This doesn't seem that useful since bbb itself isn't centered, just the
left edge is in the center between aaa and ccc.

I also think the static position when there are no neighbors (i.e., a
position:absolute flex item with no other flex items) is a bit unexpected.
I wouldn't expect flex-pack to change the static position.

Received on Wednesday, 4 January 2012 19:43:02 UTC

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