-
Notifications
You must be signed in to change notification settings - Fork 717
[css-view-transitions-2] how do we decide whether to use layered capture? #11078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We haven't resolved on having an opt-in in the first place yet, perhaps we should repurpose this issue to resolve on whether this is an opt-in, including on its old/new behavior? |
SGTM, decide on whether to have an opt-in and if so resolve when it's different between old/new DOM. |
From the explainer: Is layered always better?In short, no. Layered works best for animations that superimpose the two states on top of each other and animate them as if they were one morphing element. For other animations, like slide animations (see the header in this demo, layered capture doesn't make sense and might look odd. Having the two layers as content often makes more sense in that case. In addition, when the two states are very different, layered animation might result in discrete animations (e.g. between a circle and a square clip-path), which would feel less smooth than crossfade. Backwards compatibility & opting in/outBackwards compatibility analysis using the HTTP archive and trying some sites with the new mode shows that very few pages would be affected by this, as the vast majority relies on the default transition. However, any slide transition would feel a bit broken (like the demo above). That's because the : There are 3 ways to go about this:
|
If a css property decides capture mode, how do we resolve when it's different between old/new DOM. we generally err towards resolving such conflicts from new DOM state. But in this case it changes how the old snapshot was captured so we likely need to stick with the old DOM value.
Also, for entry animation case, we should decide this once when capturing new DOM. So if the property changes mid-animation it has no impact similar to removing the name mid-animation.
@noamr
The text was updated successfully, but these errors were encountered: