Re: [csswg-drafts] [css-view-transitions-2] Automatic support for clipping? (#8821)

Here's an example I've run into that illustrates the problem well. In this instance each of these "chips" is its own shared element. I would love for an automatic clip path to be applied to each of them so that the fade out or fade in would match the appearance on screen by default.

https://github.com/w3c/csswg-drafts/assets/23196205/1945f2ea-8e15-41e4-b85d-2ae6c6daddf9

I've mentioned this before but having access to the dimensions through something like an `env(<view-transition-name, width)` or something like that would be super ideal. Automatic clip-path based on the scroller here is our 90% use case and would do most of what we want, but there are also other use cases. Having the data the API is already using would give us more capabilities in general to do custom variations on the `clip-path`, or `translate` only if something is just moving on the `x/y` coordinates and we can guarantee size isn't changing between the 2 items to be able to get a bit of a performance boost. Even to just override the default animation with a bit of a different default. 

That's all just extra, the automatic clipping you are suggesting would **already be a huge win** given the large amount of scroll containers and clipping in current web apps.



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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 18 January 2024 20:07:28 UTC