Re: [csswg-drafts] [css-view-transitions-2] Declarative opt-in for cross-document navigations (#8048)

One minor comment on 
```
<<navtype>> = '' | (navigation || back || forward || reload) | including-reload
```

It could be useful to provide an identifier for a multi-entry jump e.g. `back(1)`, `navigation(-3)`, `back(*)` or something like that. Many well-formed transitions+animations rely on a guarantee on which page(s) can be directly connected.

Jumping between two arbitrary pages that are many navigations apart might generate unexpected motion with VT API annotations, and it would be great to have a way to explicitly disable this or specify a simpler animation like a full-page cross-fade.

This could apply to the opt-in here, and would also be useful for the actual CSS styling specified.  Using cascading rules to override will give power to customize e.g.
```
@view-transition same-site (back(*), forward(*) { trigger: navigation }

::view-transition-old(root) back(*),
::view-transition-new(root) back(*) {
  animation: simple-back-animation;
}

::view-transition-old(root) back(1),
::view-transition-new(root) back(1) {
  animation: advanced-back-animation;
}
```
(not bikeshedding here with the syntax, just the functionality)



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


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

Received on Tuesday, 10 October 2023 18:18:23 UTC