Skip to content

Commit 817e788

Browse files
committed
ideas/timelines: Describe the scroll-timeline property approach. Default direction to 'block'.
1 parent 8bd7fbd commit 817e788

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

ideas/timelines.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,23 @@ Scroll-linked animations use a timeline based on scroll position, rather than on
2020
These are animations whose timeline goes from 0% to 100% based on the scroll position of an ancestor scroll container. Proposal is to use an inline functional notation to identify the timeline using the ''animation-timeline'' property.
2121

2222
<code>
23-
animation-timeline: auto | scroll(DIRECTION SCROLLERNAME?);
23+
animation-timeline: auto | scroll(DIRECTION? SCROLLERNAME?);
2424
DIRECTION = block | inline | vertical | horizontal
2525
SCROLLERNAME = root | nearest | IDENT
2626
</code>
2727

28-
**nearest** (the default) references the nearest ancestor scroll container; **root** references the main viewport scroller. IDENT references the ''container-name'' property: it filters the lookup to the nearest scroll container with the given ''container-name''.
28+
**nearest** (the default) references the nearest ancestor scroll container; **root** references the main viewport scroller. IDENT references the ''container-name'' property: it filters the lookup to the nearest scroll container with the given ''container-name''. The default direction is ''block''.
2929

3030
(''auto'' is the initial value, and behaves as animations have always done, triggering on application of the animation and lasting for the specified duration and delay.)
3131

32-
Alternately, some ''scroll-timeline'' properties could be used to name the timeline for a more indirect but reusable approach.
32+
Alternately, some ''scroll-timeline'' properties could be defined, which when used on a scroll container would allow naming its timeline for a more indirect but reusable approach.
33+
34+
35+
<code>
36+
scroll-timeline-name: IDENT#;
37+
scroll-timeline-direction: DIRECTION#;
38+
scroll-timeline: [DIRECTION? IDENT]#;
39+
</code>
3340

3441
==== Animations linked to view progress as timeline ====
3542

0 commit comments

Comments
 (0)