Re: [css3-flexbox] absolutely positioned flex item should not have side effect on space distribution

fantasai <fantasai.lists@inkedblade.net> writes:

> On 07/11/2012 03:34 AM, John Hax wrote:
>> Absolutely positioned flex item should not have side effect on space distribution. Since space-* is about distribute spaces
>> evenly,
>>
>>    A--B--C
>>
>> with B absolutely positioned, should be rendered as
>>
>>    A--C
>>
>> , where B is positioned at the middle of A and C if all 'top'/'bottom'/'right'/'left' are 'auto'。
>
> I've summarized the state of the thread at
>   http://wiki.csswg.org/topics/flex-abspos-placeholders
>
> It would help if people gave solid arguments in favor of or against
> one or the other of the proposals, preferably with understandable
> use cases. :)
>
>
> So far we've had Kang-hao and Brad Kemper weigh in on
>
>   B > A > C
>
> From implementer's perspective, I suspect it would be more like
>
>   C > B > A

That's about right. :) What I read in the spec about abspos, back when I
did the initial flexbox implementation, looked sane. That was C.

This is a corner case (well, that's what I'm thinking anyway, so I
cannot provide any use cases), so keeping it easy to spec and implement
would be nice. C is similar to how abspos behaves inside of table,
table-row-group and table-row (anonymous table structural boxes are
inserted).

Allowing abspos boxes to live inside of a non-container sounds
unpleasant (A / B), not only on the implementation side, but it also
requires you to spec a lot of things. Cross position? Is it stretched?
Flexed? Order?

It looks like B attempts to give the element "the position an element
would have had in the normal flow" [1]. But then I think it should
rather say that the static position is identical to that of the next
flex item (or, if there is no next, then at main-end? Unless there's no
preceding flex item, in which case we could pick main-start?). And then
some justify-content stuff. That was the main axis position. What about
cross axis position? Honor align-items/align-self (obviously in a way
that doesn't affect the cross size of the flexbox or its lines)?

My preferences:

C > world-wide coffee ban > B ~ A

A is simpler than B, but behavior A almost sounds like a bug report. :)

[1] http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width

-- 
---- Morten Stenshorne, developer, Opera Software ASA ----
---- Office: +47 23692400 ------ Mobile: +47 93440112 ----
------------------ http://www.opera.com/ -----------------

Received on Tuesday, 24 July 2012 07:21:39 UTC