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

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

From: Morten Stenshorne <mstensho@opera.com>
Date: Tue, 24 Jul 2012 12:04:26 +0200
To: "Kang-Hao \(Kenny\) Lu" <kennyluck@csail.mit.edu>
Cc: fantasai <fantasai.lists@inkedblade.net>, John Hax <johnhax@gmail.com>, www-style@w3.org
Message-ID: <87a9ypbhlh.fsf@aeneas.oslo.osa>
"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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:57 GMT