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

Re: [css3-flexbox] Changing abspos placeholders to atomic inlines

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 30 May 2012 17:26:59 -0700
Message-ID: <CAAWBYDAJBf+nnMBNqKRnDvjjOZDufXk-boktn-PcFctT=pCo4g@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: Daniel Holbert <dholbert@mozilla.com>, Anton Prowse <prowse@moonhenge.net>, www-style list <www-style@w3.org>
On Wed, May 30, 2012 at 5:21 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> ± Sent: Wednesday, May 30, 2012 3:06 PM
> ±
> ± On Wed, May 30, 2012 at 11:54 AM, Alex Mogilevsky <alexmog@microsoft.com>
> ± wrote:
> ± > It looks like at least two implementations don't like the change to atomic
> ± inline. Just in favor of stability that should be enough to revert the change
> ± and get to what it has been for last 7 years or so.
> ±
> ± Hm, I didn't realize the old flexbox did have that behavior in practice.
> ±
> ± The reason we made the change is because someone (Anton?) pointed out that
> ± inlines don't respect 'height', so the placeholder's actual dimensions are 0px
> ± wide and 'line-height' tall.
> ±
> ± However!  A linebox containing only placeholders and collapsed whitespace
> ± becomes a phantom linebox in tables, and doesn't take up any space whatsoever.
> ± We could just do the same thing here, and also achieve our desired result (that
> ± abspos placeholders don't contribute to the height of items).
>
> 'line-height' tall sounds just fine to me, if that's what is happening by default, can we document it and move on?

That's not what happens.  Current impls of old flexbox render this
with the flexbox zero-height:

<!DOCTYPE html>
<div style="display: -webkit-box; border: thick dotted;">
 <div style="position:absolute;">foo</div>
</div>

So this behavior is both desirable *and* legacy. ^_^


> Also, whatever our anonymous placeholder will do, will it do exactly same thing as if it wasn't anonymous?
>
> I’d like to be sure that the following two examples always get the same rendering:
>
>        <div style="display:flex">
>                <span style="position:absolute"></span>
>        </div>
>
>        <div style="display:flex">
>                <DIV><span style="position:absolute"></span></DIV>
>        </div>
>
> They will, right?

For that example specifically, yes.

For the closely related example:

<div style="display:flex">
  <span style="position:absolute"></span>
  <span style="position:absolute"></span>
</div>

<div style="display:flex">
  <DIV><span style="position:absolute"></span></DIV>
  <DIV><span style="position:absolute"></span></DIV>
</div>

They're the same in the current spec (where the placeholder is
inline-block) but different in the older spec and what you're
proposing (where the placeholder is inline).

~TJ
Received on Thursday, 31 May 2012 00:27:48 GMT

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