Re: [css3-transforms] What is the use-case for transform-style: flat?

On Mon, Feb 6, 2012 at 2:59 PM, Simon Fraser <smfr@me.com> wrote:
> But it's not just for performance. The 3D rendering model, as
> described in the section of the spec that describes the notion of
> 3D rendering contexts, brings in a number behaviors which
> are very different to the existing 2D rendering model, and potentially
> confusing for authors, for example intersection, and different front-to-
> back rendering order. It seems logical that the author should opt-in
> to this behavior by using preserve-3d.

What's a specific case where transform-style: preserve-3d would be
confusing to authors?  I think this is a case where transform-style:
flat would be very confusing to authors:

<div style="transform:rotatex(45deg)">
<div style="transform:rotatex(-45deg)">
Some text
</div></div>

I would expect this to be the identity transform.  Instead, it's
equivalent to scaley(0.5).

> I also think that in many cases authors won't need to use preserve-3d
> at all. If all you need is a single element which looks like it's receding
> towards the horizon, you can do that with transform: perpsective(500px) rotateY(45deg).
> You only need to start using preserve-3d if you're building "3d models"
> by transforming elements in a hierarchy.

Sure, but in that case flat and preserve-3d are the same, so either
one works just as well.  What's a specific case where authors would
want flat and *not* want preserve-3d?

> preserve-3d has no visible effect if there are no 3d transforms on elements
> beneath the element with preserve-3d.

Then what did you mean by "new behavior which can affect elements
which don't have transforms applied to them directly"?  Can you give
me a specific example?

Received on Monday, 6 February 2012 20:06:11 UTC