Skip to content

Commit 85dc45f

Browse files
committed
[scroll-animations-1] Define before/after phases of a view timeline.
1 parent d1b7fea commit 85dc45f

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

scroll-animations-1/rewrite.bs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,13 @@ spec: cssom-view-1; type: dfn;
220220

221221
: <dfn>startTime</dfn>
222222
:: Represents the [=scroll container=]’s startmost (reachable) scroll position
223-
as its scroll offset in ''px''
224-
when the timeline is [=timeline active phase|active=].
225-
Null when it is [=timeline inactive phase|inactive=].
223+
as its scroll offset in ''px''.
224+
Null when the timeline is [=timeline inactive phase|inactive=].
226225

227226
: <dfn>endTime</dfn>
228227
:: Represents the [=scroll container=]’s endmost (reachable) scroll position
229-
as its scroll offset in ''px''
230-
when the timeline is [=timeline active phase|active=].
231-
Null when it is [=timeline inactive phase|inactive=].
228+
as its scroll offset in ''px''.
229+
Null when the timeline is [=timeline inactive phase|inactive=].
232230
</dl>
233231

234232
<dl class="constructors">
@@ -257,15 +255,14 @@ spec: cssom-view-1; type: dfn;
257255
<dl>
258256
: {{AnimationTimeline/currentTime}} (inherited from {{AnimationTimeline}}
259257
:: Represents the scroll progress of the [=scroll container=]
260-
as its scroll offset in ''px''
261-
when the timeline is [=timeline active phase|active=].
262-
Null when it is [=timeline inactive phase|inactive=].
258+
as its scroll offset in ''px''.
259+
Null when the timeline is [=timeline inactive phase|inactive=].
263260
</dl>
264261

265262
If the {{ScrollTimeline/source}} of a {{ScrollTimeline}}
266263
is an element whose [=principal box=] does not exist
267264
or is not a [=scroll container=],
268-
then the {{AnimationTimeline/phase}} is the [=timeline inactive phase=].
265+
then its {{AnimationTimeline/phase}} is the [=timeline inactive phase=].
269266
It is otherwise in the [=timeline active phase|active=] phase.
270267

271268
Note: The {{ScrollTimeline/startTime}} and {{ScrollTimeline/endTime}} attributes
@@ -423,30 +420,30 @@ spec: cssom-view-1; type: dfn;
423420
: {{ScrollTimeline/startTime}} (inherited {{ScrollTimeline}}
424421
:: Represents the starting (0% progress) scroll position
425422
of the [=view progress timeline=]
426-
as its [=scroll container=]’s scroll offset in ''px''
427-
when the timeline is [=timeline active phase|active=].
428-
Null when it is [=timeline inactive phase|inactive=].
423+
as its [=scroll container=]’s scroll offset in ''px''.
424+
Null when the timeline is [=timeline inactive phase|inactive=].
429425

430426
: {{ScrollTimeline/endTime}} (inherited from {{ScrollTimeline}}
431427
:: Represents the ending (100%) scroll position
432428
of the [=view progress timeline=]
433-
as its [=scroll container=]’s scroll offset in ''px''
434-
when the timeline is [=timeline active phase|active=].
435-
Null when it is [=timeline inactive phase|inactive=].
429+
as its [=scroll container=]’s scroll offset in ''px''.
430+
Null when the timeline is [=timeline inactive phase|inactive=].
436431

437432
: {{AnimationTimeline/currentTime}} (inherited from {{AnimationTimeline}}
438433
:: Represents the current progress
439434
of the [=view progress timeline=]
440-
as its [=scroll container=]’s scroll offset in ''px''
441-
when the timeline is [=timeline active phase|active=].
442-
Null when it is [=timeline inactive phase|inactive=].
435+
as its [=scroll container=]’s scroll offset in ''px''.
436+
Null when the timeline is [=timeline inactive phase|inactive=].
443437
</dl>
444438

445439
If the {{ScrollTimeline/source}} or {{ViewTimeline/subject}} of a {{ViewTimeline}}
446440
is an element whose [=principal box=] does not exist
447441
or is not a [=scroll container=],
448-
then the {{AnimationTimeline/phase}} is the [=timeline inactive phase=].
449-
It is otherwise in the [=timeline active phase|active=] phase.
442+
then its {{AnimationTimeline/phase}} is the [=timeline inactive phase=].
443+
The timeline is otherwise
444+
* in the [=timeline before phase|before=] phase when {{AnimationTimeline/currentTime}} < {{ScrollTimeline/startTime}}
445+
* in the [=timeline active phase|active=] phase when {{ScrollTimeline/startTime}} &le; {{AnimationTimeline/currentTime}} &le; {{ScrollTimeline/endTime}}
446+
* in the [=timeline after phase|after=] phase when {{ScrollTimeline/endTime}} < {{AnimationTimeline/currentTime}}
450447

451448
ISSUE: Figure out how to incorporate fit/inset abilities.
452449

0 commit comments

Comments
 (0)