-
Notifications
You must be signed in to change notification settings - Fork 50
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
High level options for customizing animation for offscreen elements #84
Comments
I don't have a good idea for this aside from another CSS property: .whatever {
page-transition-clamp-position: just-out-of-viewport-please;
} |
This page documents the issue here https://static-misc-2.glitch.me/page-transition/#header-to-new-position-scrolled |
A high level solution here would be something like: .whatever {
page-transition-offscreen-behavior: …;
} Where the values could be:
But I'm going to look into lower-level solutions. |
@jakearchibald why not leave it up to the user since they have to offer up the shared elements anyways? |
I think you're talking about the low-level solution 😄 It might not be as easy as you think. Try writing some demo code for it. |
Yea you're right. The idea would be library authors would need to orchestrate these transitions and this could be left to them. I will try a demo though. |
The default behaviour is that the element animates from its actual viewport position. #117 is exploring the low level solution to give devs the computed info so the exact behaviour can be expressed in script. I'll leave this one open for a high level CSS attribute to do the common options. |
I don't think we need the |
+1 to Jake's comment, we can start with a simpler property for now. So the summarized proposal is:
|
Hmmmmm, it might not be compatible to discard elements in some later release without an opt-in. However, +1 to the rest. |
Closing this so we can continue the discussion in csswg. |
From the explainer:
Open question: Default animations work well for things which are at least partially in-viewport in both Page-A and Page-B, but it gets tricky if you consider a non-sticky header that scrolled out of view by 1000s of pixels.
The text was updated successfully, but these errors were encountered: