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

"Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu> writes:

> I am a bit confused here. Let me ask some questions before I get too
> confused.
>
> (12/07/24 15:17), Morten Stenshorne wrote:
>> fantasai <fantasai.lists@inkedblade.net> writes:
>>> 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).
>
> s/anonymous table structural boxes/'inline' placeholder/?

I meant this:
http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes

If you e.g. have this DOM:

<div style="display:table;">
  <div style="position:absolute;"></div>
</div>

the layout engine will need to insert anonymous boxes, so the tree will
become like this:

<div style="display:table;">
  <anon style="display:table-row;">
    <anon style="display:table-cell;">
      <div style="position:absolute;"></div>
    </anon>
  </anon>
</div>

By "anonymous structural boxes" I was referring to the "anon" elements
above.

>> 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?
>
> So now the "no change" proposal C is having this problem (issue 17[1] -
> Does 'order' affect abspos placeholders?). B certainly has this problem
> too. Are you actually referring to (B / C), which have the concept of
> "placeholders"?
> [1] http://dev.w3.org/csswg/css3-flexbox/issues-lc-2012#issue-17

In proposal C, I read "placeholder anonymous flex item" as "stupid
vanilla flex item with no magic" (i.e. nothing is "inherited backwards"
from the abspos child; i.e. since the abspos isn't a flex item, "order"
doesn't apply). Maybe I got that wrong? Anyway, that's how I read the
spec back in March, and that's what made sense to me.

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

Received on Tuesday, 24 July 2012 10:04:50 UTC