W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2016

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

From: Matt Woodrow <mwoodrow@mozilla.com>
Date: Tue, 27 Sep 2016 14:07:49 +1300
To: Tien-Ren Chen <trchen@chromium.org>
Cc: public-fx@w3.org, Simon Fraser <simon.fraser@apple.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Rik Cabanier <cabanier@gmail.com>
Message-ID: <649a43cb-3a5d-c6c1-fdb1-b584d720f4f0@mozilla.com>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:57 UTC