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

> I'd probably just say navigation-trigger: cross-document or trigger: cross-document-navigation, and leave the same-origin part to URL specialization

Hmmm, I have a preference for having different tokens for `same-origin` vs `same-site` in the opt-in. Because there is a security aspect to opt-ing in for same-site, it's better for that to be explicit. Rather than a `cross-document` token which implicitly opt-ins for same-site URLs as well. Also makes it easier to add same-site support later.

> The @page CSS rule uses pseudo-classes in this way. Was using that for inspiration.

Great! Indeed, I see an example [here](https://developer.mozilla.org/en-US/docs/Web/CSS/:left). I actually like it better because of specificity. Let me summarize Option 3 then.

## Option 3
This is assuming we use pseudo-classes instead of media queries for "Needs Customization" cases. These pseudo-classes can be used with any selector and the `@view-transitions` rule. The initial value for `transition-trigger` is still `script` except we have the following style rule in UA CSS.

```
@view-transitions :reload {
  transition-trigger: script;
}
```

Other navigation types will also be using similar pseudo-classes.

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


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

Received on Wednesday, 9 August 2023 15:00:12 UTC