You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[scroll-animations-1] Add auto duration and animation ranges to explainer (#8763)
This adds sections explaining the addition of automatically fitting an
auto duration to a scroll timeline or view timeline and the introduction
of a ranges section to explain animation ranges.
Fit the animation to the full scroll range without the developer needing to specify a duration.
394
+
395
+
#### Animation range
396
+
397
+
Often authors will write effects which aren't meant to fill the timeline range.
398
+
This spec adds the concept of a [timeline attachment range](https://drafts.csswg.org/scroll-animations-1/#named-range-animation-declaration) to animations.
399
+
This defines when the animation starts,
400
+
and the range which the above "auto" intrinsic iteration duration fills.
401
+
402
+
For example, given the following CSS:
403
+
```css
404
+
.animate {
405
+
animation: keyframes;
406
+
animation-range: enter;
407
+
animation-timeline: view();
408
+
}
409
+
```
410
+
411
+
The animation's start time will be implicitly set to the start of the enter timeline range,
412
+
and the animation's "auto" duration will intrinsically resolve to the length of the enter timeline range.
413
+
414
+
#### Exclusive end range exception
415
+
416
+
In Web Animations,
417
+
ranges have exclusive ends
418
+
to help make it easier to use overlapping ranges
419
+
such as putting multiple animations in a sequence.
420
+
421
+
An exception is made when a scroll or view timeline
422
+
is at its [progress timeline boundary](https://www.w3.org/TR/web-animations-2/#at-progress-timeline-boundary)
423
+
(i.e. with an active range that fills the scroll range)
424
+
to avoid the effect from becoming inactive at the scroll boundary.
425
+
Since the user is unable to scroll past the boundary
426
+
no special accommodation is needed
427
+
to facilitate animations following the boundary.
428
+
429
+
#### Dynamic Scrollability
430
+
431
+
It is possible for a scroller to no longer
432
+
overflow (`overflow: auto`). We mapped this to the web animations model
433
+
by having the timeline become idle in these situations where a time cannot
0 commit comments