Re: [csswg-drafts] [css-view-transitions-2] MPA: Reacting to the old/new page type (#8683)

We implemented MPA transitions for a project some years ago and we used attributes on the clicked anchor element to trigger the right animation.

The way we implemented MPA transitions before this API isn't really relevant, but we face the same problem. You need to know what kind of animation to start ahead of time.

In our case we knew server-side for each url what type of page it would be.  
The type of transition depended on the element the triggered the navigation and the type of page that was being navigated to.

```html
<a
  class="..."
  href="..."
  data-transition-type="foo"
  data-transition-duration="1150"
  data-transition-background-color="#dedcd9"
  data-transition-color="#000000"
>
```

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


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

Received on Wednesday, 13 September 2023 17:27:09 UTC