- From: Rik Cabanier <cabanier@gmail.com>
- Date: Wed, 26 Feb 2014 19:47:58 -0800
- To: Matt Rakow <marakow@microsoft.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
- Message-ID: <CAGN7qDBFgi+euR0vqs66-Z=0aNv+GU7EUKS_x-rHmoRu6RrW1A@mail.gmail.com>
On Mon, Feb 24, 2014 at 3:33 PM, Matt Rakow <marakow@microsoft.com> wrote:
> Hi all,
>
> I've been looking into the mailing archives for history on the design of
> transform-style: preserve-3d. I found one thread [1] that was discussing
> the usage of preserve-3d and requirement for opt-in. However, it doesn't
> look like the issue was fully resolved (apologies if I've missed it
> somewhere else).
>
Simon recently presented a solution at the CSS F2F and posted a document to
public-fx [1] to clear some things up.
> I definitely agree that there are scenarios for 'flat' as Simon mentioned
> in his mail [2], but I think these represent the minority case. It seems
> to me that the only scenario where 'flat' is the desired value is that
> scenario where the author wants to explicitly flatten a subtree of a 3d
> model.
>
> Has thought been given to making 'preserve-3d' the initial value for
> transform-style? I recognize the performance impact that preserve-3d
> support entails when it is actually necessitated, but it seems to me that
> UAs should be able to detect and optimize for truly 2d scenarios similar to
> what Aryeh was saying in his mail [1].
In particular, this would allow for cleaner CSS in Simon's scenario --
> consider the following HTML:
>
> <div class="three-d-root">
> <div class="transformed-element">
> <div class="transformed-element">
> <div class="transformed-element">
> <div class="scene-flattener">
> <div class="three-d-root">
> <div class="transformed-element">
> <div class="transformed-element">
> <div class="transformed-element">
>
> Under the current spec, the CSS required to make this work as intended
> would look something like:
>
> /* option 1 - the author effectively does a CSS reset */
> * { transform-style: preserve-3d; }
> .scene-flattener { transform-style: flat; }
>
> /* option 2 - altering the transform-style on fewer elements, but
> risking a specificity war */
> .three-d-root * { transform-style: preserve-3d; }
> .scene-flattener { transform-style: flat !important; }
>
> By comparison, if preserve-3d were the initial value:
>
> .scene-flattener { transform-style: flat; }
>
> Again, apologies if this has already been resolved somewhere and I've
> simply missed it.
>
1:
https://docs.google.com/document/d/1mNF7Z67WnnV05RqXa37PmfvRbgAZwj7-h-7Y_uQ_UPE/edit?pli=1#
Received on Thursday, 27 February 2014 03:48:32 UTC