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

Re: [css3-flexbox] Is painting order affected by 'flex-order'?

From: Tony Chang <tony@chromium.org>
Date: Thu, 17 May 2012 12:05:20 -0700
Message-ID: <CAL-=4P0X3Lw7xezim4mgyEd5iiv2-WHSejbnpLjAoXSbt+E+rA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Daniel Holbert <dholbert@mozilla.com>, www-style list <www-style@w3.org>, Alex Mogilevsky <alexmog@microsoft.com>
On Thu, May 17, 2012 at 11:10 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, May 17, 2012 at 10:49 AM, Tony Chang <tony@chromium.org> wrote:
> > It shouldn't be too hard to change the implementation, but it seems like
> > painting in flex-order would be less confusing.  That is, if I change
> order,
> > I would still expect the first flex item (visually) to be painted first.
> The argument to the contrary is that other layout modes that kinda
> induce reordering, like Grid, don't change the painting order based on
> where a box is placed.

I think comparing flex-order to grid layout is the wrong comparison.  A
flexbox has a natural layout order that matches the DOM order.  A grid
doesn't have a natural layout order and each cell must be specified in CSS.

Conceptually, flex-order is more like z-index.

> I don't think this is a strong argument, personally.  I think that
> flex-order should be thought of as (and eventually defined in terms
> of) box-tree reordering, and it makes the most sense to have that
> directly affect painting order.  If we change the name to
> 'display-order' and have it also apply to Grid auto-positioning,
> that's the same deal.  On the other hand, normal Grid positioning is
> more like abspos, which is clearly a layout tool, not a box-tree
> manipulator.

Right, that matches my mental model as well.
Received on Thursday, 17 May 2012 19:05:50 UTC

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