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

Thinking about this again.

I see the problem the opt-in tries to solve as mismatch between same-origin transitions. It's not a security problem, but rather an issue of unintended visual effects by having e.g. an SPA transition in both documents lead to a spurious MPA transition between the two documents.

IMO any kind of boolean opt-in doesn't solve this, either in HTML or CSS.
You could opt-in to some MPA transitions within your origin, and still reach a case where some pages are uncoordinated with you and cause an unintended MPA transition.

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 `cross-document-transition-name`. Only if the names match, the view transition would be enabled.

The purpose in doing something like that is to ensure a match in a flexible way, that's still ergonomic and consistent with how SPA navigations declare matching.





-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8048#issuecomment-1554061480 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 06:13:10 UTC