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

> You mean cross-document-same-origin-navigation implies that? What if that explicitly excluded reloads? Then we can add a reload keyword to transition-trigger. 

That's an interesting idea!

One aspect, which I now realize wouldn't work for option 2 either, is that we wanted to ensure that all cases in `transition-trigger` are mutually exclusive. Except short-hands, for example a keyword like `same-origin` which expands to `same-document-navigation, cross-document-same-origin-navigation`.

The above allows developers to enable/disable all possible combinations. All navigation cases (`same-document-navigation`, `cross-document-same-origin-navigation`, `same-site-navigation`) can technically be triggered by a reload. So with the current syntax authors can't enable transitions *only* for reloads which are cross-document navigations. But I can't think of a case where authors would want different behaviour for cross-document vs same-document reloads.

Another thing to consider is we later on add `reload` to a media-query (because authors want to customize the transition differently for it). It would be a bit awkward to have `reload` in both the opt-in syntax and media-query but doable.

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


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

Received on Saturday, 5 August 2023 20:59:24 UTC