- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Wed, 17 Apr 2024 09:22:58 +0000
- To: public-css-archive@w3.org
> ([#](https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2060294154)) An `auto` keyword wouldn't address those use cases, but it would address the ones that Jen is trying to solve, which don't have this problem. If you're rebuilding the DOM, then yes, you will need to do something else. But if you're not -- and there are many interesting cases where where you're not -- we can make this a lot simpler for the author. Do note that `auto` would work in Jen’s case as the code is not using any custom animations. Once an author wants to use a custom animation, `auto` itself can’t help you there. When everything is set to `auto`, how would you apply custom animations onto them: `::view-transition-group(?whatgoeshere?)`? It’s only when combined `view-transition-class` that `view-transition-name: auto` becomes really useful – something worth considering in WebKit’s case, as by the looks of it the current implementation seems to be scoped to L1 which does not include L2’s `view-transition-class`. > ([#](https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2060294154)) To address things that move or disappear, authors can use unique tags for those items. So let's say you have a list of 10 items and you're moving item 8 to be the 2nd item. You identify that item with a unique name, and the rest of the items with a generic one, and the UA matches them up in DOM order. Removing nodes is not covered by this. Take a list of 10 items where you remove item 2 wrapped in a View Transition. All items after the original item 2 get the numbers 3-10 in the old snapshot but 2-9 in the new snapshot – they won’t line up. _(IIRC `random()` would be able to correctly cover this, as you can pin a generated value on a node)_ --- This to say that the story for `view-transition-name: auto` would be: _“Yeah you can use that, but not if you use framework X, Y, or Z; not if you are removing nodes; not if you want to apply custom animations in browser X because they have implemented L1; and not for MPA.”_ – seems a bit weird to add a feature that only works in a limited number of cases. The `ident()` + `attr()` approach does not have these limitations. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2060807886 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 17 April 2024 09:22:58 UTC