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

RE: [css-transforms] Initial value of transform-style

From: Matt Rakow <marakow@microsoft.com>
Date: Thu, 27 Feb 2014 01:53:05 +0000
To: Aryeh Gregor <ayg@aryeh.name>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <fd9f592fb8ae4d7481bdb0a9662ae3b8@BL2PR03MB260.namprd03.prod.outlook.com>
Ah, good point, I hadn't thought of that.  It does seem like there's value in requiring the developer to explicitly mark the root of a 3d scene.

Perhaps the better approach would be to make transform-style inherit?  This would still help facilitate that mainstream use case (continuing to build out a 3d scene).  Also, it would require the developer to explicitly mark the root of a nested flattened scene as "flat", which also seems nice for its explicitness.

This would change the example from my previous mail to:

    <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">

    .three-d-root { transform-style: preserve-3d; }
    .scene-flattener { transform-style: flat; }

What do you think?

Thanks,
-Matt

> -----Original Message-----
> From: Aryeh Gregor [mailto:ayg@aryeh.name]
> Sent: Tuesday, February 25, 2014 4:23 AM
> To: Matt Rakow
> Cc: www-style@w3.org
> Subject: Re: [css-transforms] Initial value of transform-style
> 
> On Tue, Feb 25, 2014 at 1:33 AM, Matt Rakow <marakow@microsoft.com>
> wrote:
> > 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.
> 
> If the page you're working with has a background on the root element, then
> it would probably be surprising if the 3D transforms you applied to a
> descendant tree caused part or all of it to vanish behind the page's
> background.  If the whole page had transform-style:
> preserve-3d, this is what would happen.  If only the elements you mean to
> apply 3D styles to have preserve-3d, they will not intersect with the page
> background, which is probably the desired effect.  I don't know if this is a
> minority or not, but I wouldn't think so.
Received on Thursday, 27 February 2014 01:53:34 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 27 February 2014 01:53:34 UTC