Re: [csswg-drafts] [css-transforms-2] proposal new transform-style: detached (#4242)

> Option (a) is problematic for at least scrolling, if the scrolling transform applies to the detached content but not its clip.

A possible solution would be to apply scroll clip to detached surfaces in non-root scroll areas. This can be done at a platform level by defining a boundary that corresponds to the scroll container, similar to the 'prism' concept which Rik described.

> How about this proposal:
> 
> `transform-style: preserve-3d` on the root element causes no flattening at the root, for user agents which want to display multiple planes in 3D. Otherwise flattening will still occur.
> 
> That's it. No other changes. :)
> 
> In particular, the previous resolutions about what causes flattening and how `preserve-3d` is set remain. IOW:
> 
> * Any element with `transform-style` other than `preserve-3d` flatten into the ancestor element's plane
> * All effects and clips cause the used value of `transform-style` to be flat.
> 
> If a developer wants to have a 3D plane that floats above the other content in a user agent that supports such things, they should:
> 
> * put `transform-style: preserve-3d` on the root element of the 3D plane and all ancestors
> * Don't have flattening properties on the ancestors
> * Place a 3D transform on the root element of the 3D plane

This is a very elegant solution. But the one disadvantage would be that any given website would require significant changes if certain elements are to be detached. Detaching any element would require an audit of all its ancestors to ensure they are not flattened.

I am also not clear on all the properties that could cause flattening in a node. Are they the same as the criteria for stacking contexts?


-- 
GitHub Notification of comment by abalasubramaniyan-ml
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4242#issuecomment-551923710 using your GitHub account

Received on Friday, 8 November 2019 17:43:29 UTC