- From: Jessica Janiuk via GitHub <noreply@w3.org>
- Date: Mon, 30 Jun 2025 07:30:17 +0000
- To: public-css-archive@w3.org
> > I'm very curious about what you had in mind there. I would also be interested in understanding how view transitions solve this same problem. I imagine the transition wrapper code changes something about how removal happens - and that allows for more style behavior before removal? > > An exit transition is about the same as a view transition like this: > > ``` > document.startViewTransition(() => parent.removeChild(child)) > ``` > > Where the style sheet is configured for `child` to have a `view-transition-name` and also specify the desired fade animation for `child`. > > So we could potentially define a new syntax for an "exit animation" that is syntactic sugar for the above. A browser implementation might be quite tricky or expensive though, since gathering a screenshot on every update to `child` is expensive, and a synchronous delay to gather a screenshot before removing the child might stall the UI. This is essentially what I assumed this implementation would be. Once scoped view transitions land, people are going to do this pattern anyway, and having this syntactic sugar would be nice. I definitely can see the challenges with the screenshot performance, though. Either way, though, this problem exists, either with the syntactic sugar or not. -- GitHub Notification of comment by thePunderWoman Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9500#issuecomment-3018096792 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 30 June 2025 07:30:18 UTC