Open khushalsagar opened 1 year ago
If we do this, it should be an opt-in on top of the general opt-in we decide in https://github.com/w3c/csswg-drafts/issues/8048.
If the change is scroll position, then scroll-behavior: smooth
already provides an animated transition that communicates the change, and we shouldn't hijack that unless it's really what the developer wants.
Changes that aren't scroll-related, but still don't depend on JS, are much rarer.
Cross-document same-origin transitions build on the idea of View transitions being implicitly triggered by a navigation. While it's obvious that this should be done for cross-document navigations, authors could use the declarative transition for same-document navigations involving a hash change as well.
This can be made configurable with the declarative opt-in we decide in #8048.