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

Re: [css3-flexbox] issue 10: absolute-positioned flexbox items

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 18 Jul 2011 15:04:32 -0700
Message-ID: <CAAWBYDC8Rf3FsjHBNg6XArj9GT849fWCwdn+QaMTGDKMhHy+wg@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Mon, Jul 18, 2011 at 2:53 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> ± -----Original Message-----
> ± From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> ± Sent: Monday, July 18, 2011 2:34 PM
> ±
> ± Whatever we do, we should be consistent with how display:table handles
> ± things.  I don't think this is an important enough issue to justify a
> ± confusing difference.
> ±
> ± (I don't care what that means; adjusting display:table is as valid as
> ± adjusting display:flexbox, if it can be done without compat problems.)
> I don't think display:table (or anything in CSS2.1) will help make a decision here. I can't think of any example in CSS2.1 where it would be possible to tell if a positioned element leaves a zero-size placeholder (as long as it is considered "empty" for margin collapsing).

<!DOCTYPE html>
<div class=table>
 <div class=row>
  <div class=cell>foo</div>
  <div class=cell>bar</div>
 <div class=row>
  <div class=cell id=abspos>baz</div>
  <div class=cell>qux</div>
.table { display: table-cell; }
.row { display: table-row; }
.cell { display: table-cell; }
#abspos { position: absolute; top: 0; left: 100px; }

All browsers agree that there's an empty cell below "foo", which
pushes "qux" into the second column with "bar".  If the abspos is
totally out-of-flow, this wouldn't happen.

> I have mixed feelings about absolute elements creating empty anonymous flex items. Until that, you could always delete any absolute element and be sure that it will not change any non-positioned layout. Breaking that without any important gain doesn't sound right...

You could only do so because there was no way to detect whether it was
there or not (we have a special rule for phantom line-boxes to keep an
abspos before a block from generating a linebox).

Received on Monday, 18 July 2011 22:05:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:02 UTC