Re: [csswg-drafts] [css-view-transitions-2] Allow an auto-generated `view-transition-name` that doesn't default to ID (#10995)

I'm not against `match-element`. I was trying to explain that it isn't anywhere near "the thing you always want" when it comes to page transitions. Also, it doesn't work effectively in cross-document navigations. Because of this, I'm glad that it's a keyword that roughly expresses how it works, rather than be mixed in with other behaviours behind an enticing `auto` keyword.

Being able to use an attribute as the view transition name is interesting, and I'm not against that functionality being added. I have some worry that people will do something like:

```css
.some-container * {
  view-transition-name: attr(id, none);
}
```

…resulting in weird changes to transitions as folks add/remove IDs from elements for purposes other than view transitions. But at least they're somewhat clearly opting into that behaviour. If I saw a PR with the above in, I'd reject it, and ask it to instead use an attribute like `data-view-transition-name` instead, so the usage didn't get muddled.

`attr(id, match-element)` is interesting and it seems ok that it could be supported. However, I would never recommend it to developers, and would reject PRs containing it, and instead ask developers to use `attr(data-view-transition-name, none)`, so we don't encounter difficult to debug differences between same-document and cross-document transitions.

I think the group should avoid introducing 'quirksmode' like switches in behaviour between same-document and cross-document transitions.

I think those pushing for this combined `auto` behaviour are letting themselves be influenced by codepen demos that don't work in production since they component transitions, whereas the current view transitions act across the whole document. I encourage the group to develop "scoped view transitions" - view transitions that are scoped to a particular element, allowing for concurrent transitions. After that, we might be in a better place experience-wise to discuss how something like `auto` should behave. I don't see why we need to rush it through now.

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


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

Received on Thursday, 21 November 2024 11:05:23 UTC