Re: [css3-transforms] 3D transform updates

On Oct 27, 2014, at 8:15 pm, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Tue, Oct 28, 2014 at 12:27 PM, Simon Fraser <smfr@me.com> wrote:
> On Oct 27, 2014, at 3:36 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> 
> > Thanks for doing this! The spec is much improved.
> >
> > Putting all non-3D content of a 3D rendering context at the very bottom of z-order seems simpler and more robust than putting it at z=0 as the spec currently says. Authors can usually opt into the z=0 effect by wrapping content in a trivial 3D transform.
> 
> Agreed, and this would address issue 3. It’s just unfortunate that it doesn’t match the behavior of z-index: -1, but I’m willing to live with that. We also need to consider how 3D transformed elements interact with 2D-transformed elements (which might have 3D-transformed descendants); in WebKit at least, a 2D-transforemd element with a 3D-transformed descendant gets popped into a texture, so would start interleaving.
> 
> Isn't that simple to fix by forcing that 2D-transformed element to flatten, and then giving its layer a z coordinate that forces it to the back of the depth buffer?

It’s not that easy for us because “sending to the back of the depth buffer”  (via a negative z-translate) would result in it getting smaller if there’s a perspective in effect.

> 
> > There is one case where they can't: as written, a preserve-3d child of the root element can be partially behind and partially in front of a 'position:fixed' element. Is that something we want to support --- or something we explicitly *don't* want to support?
> 
> You mean a 3D-transformed child of the root can intersect a position:fixed? I don’t see an issue with that offhand, but we should make sure that it’s possible to get the position:fixed to always be over everything else and not get intersected, with the right flattening.
> 
> If we adopt my proposed change, then a 3D-transformed child of the root can't intersect a position:fixed. So whether we want to support that or not is an important question.

I’m OK with not doing intersection between 3D transformed elements and position:fixed here.

One thing to note with your proposed change is that 3D-transformed elements will always overlap position:fixed unless there is explicit flattening in their ancestor chain (which would prevent any perspective on the body from affecting them), which is unfortunate. Example at [1].

Simon

[1] http://smfr.org/css/transforms/fixed-intersection.html

Received on Tuesday, 28 October 2014 04:43:40 UTC