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

> For `overflow: hidden`, I suspect that the author is going to expect that the transformed element is visible. What happens today if a hidden element is transformed into view?
> Are there's special ruls for `clip-path`? We need to do some investigation there and try it out with the current code :-)

> > Well we haven't really decided what preserve-3d itself means.
> Yes, that's a bit unfortunate. Was any progress made on this recently?

There has been a lot of discussion of what happens with overflow:hidden and preserve-3d descendants. See for example #918 . overflow:hidden will flatten.

The plan of record arrived at at TPAC this year is to align on Firefox behavior for preserve-3d etc. We should for sure finish that work and ship it inter-operably before adding new transform styles.

> > Similarly, how would `detached` interact with atomic operations such as filtering? For example, if two detached boxes have a blur filter on them, would their pixels be blurred as if preserve-3d was used?
> 
> Yes, the filters would apply as usual, except the effect would be computed by the system compositor and not the browser's one.
> We haven't hooked that part up yet though. Do you envision problems in that workflow?

Yes, I envision potential problems. Effects such as opacity, filter, and blend-mode are supposed to be atomic operations, and that would not be possible if descendant content was detached. For filter-like effects, we can in some cases apply the filter to the detached content (blur or opacity for example). Other filters that involve positioning probably won't work. Clips don't make any sense to apply to detached content.

Two options could be:
(a) Don't apply any effects or clips to transform-style: detached content
(b) Cause flattening of detached content (despite `transform-style: detached`) if any effects or clips exist on ancestor DOM elements

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

Following the logic of (b) will I think end up with the same solution we arrived at at TPAC to fix these problems.

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

Received on Wednesday, 30 October 2019 16:43:50 UTC