Re: [csswg-drafts] [css-view-transitions-2] Ignore offscreen elements from participating in transitions (#8282)

We can add `view-transition-capture-inset` to customize the margin for determining an element's visibility on top of `view-transition-visibility` going forward.

Between `view-transition-visibility` and `view-transition-capture-mode`, you could do the latter with something like:

```css
#transition-root * {
  view-transition-visibility: not-clipped;
}
```

So seems nicer to give `view-transition-visibility` which allows per element choice..?

Also, just to clarify, @noamr's argument is not about how the author expresses whether the element should be captured (based on visibility) or not. But whether the API should be about controlling whether the element is captured. Or just exposing what the element's visibility was. For example, `::view-transition-old:in-viewport`/`::view-transition-old:out-of-viewport`, and let the author decide how they want to react for each case. One of which could be to override the UA default morph animation with an entry/exit animation.

My take is that the above is more complicated than it needs to be, especially given that this feature is about providing an easy declarative way to do something which is already possible in script. So the declarative solution should make ~most of the cases easy instead of trying to solve all possible cases. And also allow authors to optimize away offscreen rendering.

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


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

Received on Wednesday, 12 June 2024 21:39:31 UTC