Re: [csswg-drafts] [css-view-transitions-2] Components participating in the transition need to leak info to embedding context (#8960)

@jakearchibald, https://github.com/w3c/csswg-drafts/issues/8683 can help in some cases but not all.

1. View Transition on Same-Document Navigation
   The URL based media queries we build for cross-document navigations should work here as well. Ideal would be for the declarative opt-in to work too such that same-doc navs do an automatic transition similar to cross-doc navs. Maybe you don't have to call startViewTransition!
   
2. View Transition with no navigation
   I'm not sure how we do any of the media query based options in https://github.com/w3c/csswg-drafts/issues/8683 for this. By design the browser needs some identifier for the new DOM state for queries like `@media (vt-next-page: article)` to apply to the old DOM. The caller could pass these params to `document.startViewTransition` but is it really better than the caller setting a class name on the root element? I'm not opposed to a pattern like this, just not seeing the advantage. Especially because the pattern won't work for scoped transitions. Media queries are globally applied on the Document so are not a good fit for scoped transitions. So if we're going to recommend the class based option for scoped transitions, what's the harm in using it for transitions which target the whole Document. Its conceptually a scoped transition where the root of the transition is the document element.

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


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

Received on Thursday, 22 June 2023 15:56:14 UTC