Re: [css3-flexbox] Painting order

"Tab Atkins Jr." <jackalmage@gmail.com> writes:

> On Wed, Jun 27, 2012 at 1:57 PM, Morten Stenshorne <mstensho@opera.com> wrote:
>> "Tab Atkins Jr." <jackalmage@gmail.com> writes:
>> I was thinking that we don't do the same paint reordering for
>> table-row-group, table-header-group and table-footer-group. (Well, both
>> IE and Opera do it, but I believe that's a bug, since there's nothing in
>> the spec that suggests such behavior). Then again, it's probably not so
>> interesting to change between those display types dynamically. But
>> consistency is nice. Why is it necessary to let 'order' affect painting
>> order for flex items, when there already exists a mechanism to do so
>> (z-index)?
>
> You're right, it would make sense to say the same thing about
> table-header/footer-group.  We should raise this as an issue.

I still think painting in tree order by default is the right thing. I
think it's predictable and consistent (and generally easier to
implement, since you HAVE to traverse them in logical order under some
circumstances anyway).

And what about BIDI reordering, then?
http://www.w3.org/TR/CSS21/zindex.html#stacking-notes says that they are
painted in tree order (but positioned in visual order).

> Relying solely on z-index isn't great. It's duplicated effort, for
> one.

This is only an issue when you have overlapping items. Why does it have
to be so convenient to achieve something that obscure, that we have to
leave the principle of painting in tree order (when there already are
mechanisms to achieve that if you really want it differently)?

> Second, you have to not only set z-index, but also set position,
> as z-index does nothing on position:static items.

I've wondered about that. Why does it have to be like that? Opacity and
transforms may already turn otherwise regular statically positioned
boxes into stacking contexts and also make them participate in the
painting order regime previously (CSS 2) reserved for positioned
boxes. Why couldn't z-index just apply to all elements?

-- 
---- Morten Stenshorne, developer, Opera Software ASA ----
---- Office: +47 23692400 ------ Mobile: +47 93440112 ----
------------------ http://www.opera.com/ -----------------

Received on Thursday, 28 June 2012 09:41:26 UTC