W3C home > Mailing lists > Public > www-style@w3.org > February 2012

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

From: Aryeh Gregor <ayg@aryeh.name>
Date: Mon, 6 Feb 2012 15:05:21 -0500
Message-ID: <CAKA+Ax=fOOOJ-WFB+7Di6+iLko3dAhdx3q0Cu5QWktVuESKUDw@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: "www-style@w3.org list" <www-style@w3.org>
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

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:11 UTC