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

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