Re: Interaction between opacity and transform-style

On Wed, Mar 14, 2012 at 8:22 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> Why is that surprising? opacity has always affected Z-ordering in CSS.

Well, it creates a new stacking context, so anything outside can't get
between anything inside.  That's not too surprising if you think about
it  The behavior I found surprising here was that it changed the order
of rendering among the translucent element's children, and between the
translucent element and its sibling.

But since you point it out, it makes sense that there has to be a
separate 3D rendering context in this case.  Otherwise you could get
something from outside in between two of the translucent boxes, which
doesn't make sense if they have group opacity.

So maybe an opacity other than 1 should cause an element with
transform-style: preserve-3d to create a new 3D rendering context
instead of extending the current one.  This is *not* the same as
transform-style: flat, which creates no 3D rendering context at all
per spec (although Safari seems to behave differently).

Received on Thursday, 15 March 2012 16:31:20 UTC