Closed vmpstr closed 1 month ago
FYI, it's proposed that we (Chromium) ship this in M121 (hitting Stable in early January), so if you have any feedback on the design now would be a good time to give it.
This does look useful, though my first look at the API confused the types with view transition names. The :active-view-transition()
selector has a very similar syntax to the ::view-transition-*()
pseudo elements which makes the confusion even more likely.
@miketaylr @vmpstr It would be good to delay shipping this in stable releases. The view transition 2 spec is still under development, with new concepts like view transition "classes" being introduced. It would be good to ensure a coherent developer story with all of these concepts to make sure developers can't confuse them with each other and prevent any potential redundancy between the concepts.
cc @fantasai
I think this is a lot more coherent now? Planning to ship this together with classes in Chrome 125. Also gave the spec a big editorial pass, see https://drafts.csswg.org/css-view-transitions-2/#selective-vt
The DX has improved since, with the renaming of :active-view-transition
to :active-view-transition-type()
which makes things significantly less confusing.
We'll mark this as support pending objections in a week.
WebKittens
No response
Title of the spec
View Transitions, Level 2 (list of types)
URL to the spec
https://drafts.csswg.org/css-view-transitions-2/#the-active-view-transition-pseudo
URL to the spec's repository
https://github.com/w3c/csswg-drafts/
Issue Tracker URL
No response
Explainer URL
https://github.com/vmpstr/web-proposals/blob/main/explainers/view-transition-types.md
TAG Design Review URL
https://github.com/w3ctag/design-reviews/issues/908
Mozilla standards-positions issue URL
https://github.com/mozilla/standards-positions/issues/905
WebKit Bugzilla URL
https://bugs.webkit.org/show_bug.cgi?id=276801
Radar URL
No response
Description
View Transitions Module Level 2 has a number of new features being worked on in parallel. This particular issue is about the "list of types" component which allows developers to specify types when calling startViewTransition. The initial issue that spawned this spec change is https://github.com/w3c/csswg-drafts/issues/8960
In short, it's an ability for developers to specify "types" of transition when calling
startViewTransition
, and be able to style their page based on which type of a transition is currently active.