-
Notifications
You must be signed in to change notification settings - Fork 707
[scroll-animations-1] Triggering scroll-based animations once #7478
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
From what I can see, the library linked above is not for scroll-linked animations, but for scroll/viewport-triggered animations, so probably not relevant at this stage. |
We used to have a note in the spec (removed here) that said scroll triggered animations were currently out of scope, it might be worth bringing this back so that it's clear it's currently out of scope. Note this was also previously discussed in #4339. I certainly welcome ideas for how to do this but the mechanism is very different in that it likely will still involve the animation being attached to the document timeline rather than a new timeline. |
Well, it's simply a whole different family. *-linked effects have their timeline attached to a continuous event that sets effect's progress accordingly, while *-triggered ones have a usual time-based timeline. |
@flackr There's a short note in the Introduction currently that says
The removed text you link to has a bit more information, do you want to update the note a bit further or do you think it's fine as-is? |
Closing this one in favor of #8942. Some good discussion about this going on in there. |
Reopening as #8942 is more concerned scroll-triggered animations (which could also run just once). Both topics can be resolved on independently. |
@bramus if this issue was reopened to discuss scroll-driven animations that run once, then isn't it something that can be easily achieved using fill mode that's either |
I don’t think they should be tied together. The default value for |
@bramus but this is what you get now OOTB with |
But if you currently scroll back up – even if you have The idea for |
Right, they persist, sorry I did a wrong check. But I do understand what you suggest, so in that case yes, there are sites in the wild that use this behavior. So it makes sense to add it. |
Are there sites that use this that aren't just using scroll triggered animations - for which we would have a different mechanism for this (described in issue #8942)? I've only seen scroll triggered animations which trigger once thus far and would be curious to see real-world examples of one time scroll driven animations. When do they consider the animation to have finished and to not start again? At the point when you scroll past the end point of the animation? I.e. it would still restart if you scroll past the start point, back up and then past it again? |
Preferably, the mechanism to have them run only once would be the same. Maybe we are looking at it wrongly? Right now we seem to be thinking in terms of “how many triggers” but maybe we should look at it in terms of the animation’s lifetime. I.e. is the (finite) timeline allowed to go back in progress or not? Options could be:
For SDA, I’ve prototyped a demo that removes the animation once the animation reached |
In #4354 (comment) @JayGeorge wrote:
Wanted to file this into its own issue for consideration.
The text was updated successfully, but these errors were encountered: