Re: [csswg-drafts] [css-view-transitions-2] CSS only way to transition between list <-> detail views (#8209)

Have been pondering about this for quite some time, but never got round to replying here.

An alternative approach I was thinking of was to allow wildcards at the end of names and pseudos.

```html
.maxiposter {
  view-transition-name: poster-*; /* Any view-transition-name starts with poster- may transition into me */
}

#miniposter-123 {
  view-transition-name: poster-123; /* Can transition into .maxiposter as the vt-name has the correct prefix */
}
#miniposter-abc {
  view-transition-name: poster-abc; /* Can transition into .maxiposter as the vt-name has the correct prefix */
}

::view-transition-group(poster-*) {
  /* … */
}
```

As for back navigations, I would expect the browser to run the animations that ran in reverse, as it knows what was clicked, what the scroll position was, etc.

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


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

Received on Monday, 5 June 2023 18:45:27 UTC