-
Notifications
You must be signed in to change notification settings - Fork 693
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
[scroll-animations-1][css-animations-1] A non-animated "Is in viewport" #10582
Comments
Using a layout dependant state in a selector is something that we tried to avoid so far, as to avoid endless loops. |
Yea that might be a better approach. Though I think endless loops in particular (pseudo-class) selectors are not an essentially different problem from view-timeline endless loops (you animate transform based on |
Specifically for that we ignore transforms, per #8298 (comment). |
Can't you animate the view timeline size, or animate something else that makes it move into/out of the viewport? |
This seems like more of an ask for the css-animations spec to perhaps have a convenient syntax for a single value animation, though I recognize there was also a proposal to use view timelines as a state selector. Moving this to level 2. |
This came up again today for use with View Transitions:
On the homepage, you’ll now see the title fly-in from the top to its position on the homepage, which is weird. Ideally, the title on the detail page would not have been captured (because it was offscreen) so that the title on the homepage can nicely fall back to a fade-in. |
there's some overlap with anchor maybe, authors can opt into hiding out of viewport pseudos with something similar, like |
Following up on #8282:
Currently to set a style that behaves differently based on whether the element is in the viewport, one has to use scroll-driven animations. For example, to set a
view-transition-name
when the element is in the viewport:The above works! However it requires going through an animation mental model for something that's not actually animated.
Perhaps view-timeline (or CSS animations in general?) can provide a convenient way to use animation primitives on something that's not animating? e.g.
The text was updated successfully, but these errors were encountered: