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

> Instead, I propose something a bit more flexible and : the :root of both documents has to share some sort of name.
It can be the view-transition-name (perhaps if it's not "root", but that might be a bit too implicit), or a new property like a page-transition-name. Only if the names match, the view transition would be enabled.

The problem with this is that UA CSS implicitly adds a `view-transition-name` to the root element [here](https://drafts.csswg.org/css-view-transitions-1/#ua-styles). So we can't rely on authors setting it as an opt-in. Also, we can't ask for the root of both docs sharing the same name, some transitions require the root of one document to match with a DOM element on the second document, [example](https://m2.material.io/design/motion/the-motion-system.html#container-transform).

If we're introducing something new (like `page-transition-name`), then we should avoid overloading it with the same purpose that `view-transition-name` is for. We also want the opt-in syntax to be extendible to declaratively opt-in to a subset of navigations (same-origin, same-site, URL regex, same-document) which doesn't fit well with reusing what `view-transition-name` is for.

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


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

Received on Friday, 19 May 2023 14:34:09 UTC