Re: [csswg-drafts] [css-view-transitions-2] Support same-site cross-origin view transitions (#10364)

My gut reaction was to have an opt-in through CSS, as not all authors have control over setting the headers.

```css
@view-transition {
  navigation: auto;
  origins: a.example.com, b.example.com; /* Or maybe even `*.example.com`? */
}
```

I would prefer to explicitly list the origins here, so that in the future – if it ever would become a thing – cross-origin VTs can use the same descriptor to include other sites.

```css
@view-transition {
  navigation: auto;
  origins: *.example.com, *.example.org;
}
```

_(Note: I’m not suggesting to add cross-site support here and now; am merely thinking ahead to make sure the syntax can support that, if needed)_

An alternative would be to allow a combination of the values `same-origin`, `cross-origin`, `same-site`, `cross-site` for the suggested descriptor but in that case:

- One could end up with a faulty combination of `same-origin cross-site`.
- I’m not sure how one would list the allowed origins/sites.
  - Maybe something like [Related Party Sets](https://developers.google.com/privacy-sandbox/3pcd/related-website-sets) (fka “First Party Sets”) could be used in that case?

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


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

Received on Monday, 27 May 2024 09:22:33 UTC