Skip to content
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

Interaction with scroll timeline #146

Open
vmpstr opened this issue Apr 15, 2022 · 3 comments
Open

Interaction with scroll timeline #146

vmpstr opened this issue Apr 15, 2022 · 3 comments

Comments

@vmpstr
Copy link
Collaborator

vmpstr commented Apr 15, 2022

This was raised at a partner sync, but since we support web animations API and from my understanding one can specify a scroll timeline instead of an animation time, we should figure out what we want to happen when the pseudo elements are tied to the scroll timeline in such a way.

Right now we destroy the pseudo element tree when there are no active animations. Also, I believe the intent is to not do hit testing in the pseudo trees (or elsewhere?) while the animation is taking place. All this leads me to believe that we don't want to support a scroll timeline for these animations. However, maybe there is an elegant way to do it.

/cc @flackr

@flackr
Copy link

flackr commented Apr 25, 2022

Reading between the lines, it sounds like you want to have a guarantee the animation is ephemeral since the state it presents the user with is one in which you can't interact with the page.

A scroll timeline animation would not be guaranteed to finish in any given time. However, the web animations api also supports specifying infinite iterations on an animation or infinite or virtually infinite durations. What do you do in these cases?

On the flip side, if a scroll linked animation were tied to a scroll snap in the right way, it would in most cases have a finite end time (unless the user held the scroll partway through in which case they couldn't interact with the page anyways).

@absurdprofit
Copy link

Also what about gesture linked navigation? For example on iOS safari you can swipe to navigate between pages. In native contexts apps have the ability to link their shared element transitions to the navigation gestures. Afik web animations don't support any other timelines than ScrollTineline and DocumentTimeline. I've had to do pretty nasty hacks to get this behaviour (for gesture linked animations).

@bramus
Copy link
Contributor

bramus commented Feb 5, 2024

@bokand brought this up within the CSSWG for discussion: w3c/csswg-drafts#9901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants