Re: [css-transforms] Unify the definition of transform-style & 3D context

On 27/09/16 1:12 PM, Tien-Ren Chen wrote:
> I'm particularly worrying about this case:
>
> <style> div { transform-style: preserve-3d; } </style>
> <div>
>      A
>      <div style="transform:translateZ(0);">B</div>
>      <div style="position:relative; z-index:0;">C</div>
> </div>
>
> If we don't make the distinction between 2D/3D (i.e. no plane / new
> plane), the transition between translateZ(-epsilon), translateZ(0),
> and translateZ(epsilon) could be tricky. IMO B should be popped into
> its own plane, and perform depth-sorting against plane AC as a whole.
What would be the intended result of depth sorting in this case? They 
both have 0 depth, no z-index and now the content order is undefined 
since AC is both before and after B.

I prefer having B transition to being between A and C while the Z 
translation is 0.

>
> Another weird case:
>
> <style> div { transform-style: preserve-3d; } </style>
> <div id="A" style="background:some_image; translateZ(0);">
>      Foreground
>      <div id="B" style="transform:translateZ(0); position:relative;
> z-index:-1;">Stuck in middle?</div>
> </div>
>
> Should B to stack in between the background/foreground of A because it
> has negative z-index? I think the sensible thing to do is to pop it to
> its own plane.
I'm not sure I understand this case fully. It makes sense to me that B 
would be in the middle, z-index applies within the current stacking 
context, putting B before Foreground.

- Matt

Received on Tuesday, 27 September 2016 01:08:30 UTC