Skip to content

[scroll-animations-1] Transition delays in scroll-linked animations #7059

Open
@fantasai

Description

@fantasai

Copying out @flackr's comment #6674 (comment)

Here's a good example where animations a kinda-scroll-linked but not directly: https://codepen.io/isladjan/pen/abdyPBw

@smfr For these use cases I propose properties similar to transition timing functions (transition-duration, transition-timing-function, transition-delay) which will specify a delay over which the scroll input will plug in to the timeline.

E.g. for view-timeline:

view-timeline-transition-duration: <time>
view-timeline-transition-timing-function: <easing-function>
view-timeline-transition-delay: <time>

Then for the above use case the developer would simply specify a view-timeline-transition-duration: 2s and the position of the animation time would smoothly move towards the scroll position over 2s.

[...]

The duration in my proposed property is the length of time it takes the scroll based timeline to catch up to scroll position changes. Here's an example hacked together with javascript using a custom property transition to represent the delayed transition value being plugged in to the timeline:

https://jsbin.com/qekodug/edit?css,js,output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Wednesday

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions