Skip to content

Commit f4a3db2

Browse files
committed
[scroll-animations-1] Define 'animation-range' defaulting. #8438
1 parent 284cfef commit f4a3db2

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

scroll-animations-1/Overview.bs

+39-5
Original file line numberDiff line numberDiff line change
@@ -936,11 +936,41 @@ spec: cssom-view-1; type: dfn;
936936
The 'animation-range' property is a [=shorthand property|shorthand=]
937937
that sets 'animation-range-start' and 'animation-range-end'
938938
together in a single declaration.
939-
If a <<timeline-range-name>> alone is specified,
940-
'animation-range-start' is set to that name plus ''0%''
941-
and 'animation-range-end' is set to that name plus ''100%''.
942-
Otherwise, if the <<'animation-range-end'>> value is omitted,
943-
it is set to ''animation-range-end/normal''.
939+
940+
If <<'animation-range-end'>> is omitted
941+
and <<'animation-range-start'>> includes a <<timeline-range-name>> component,
942+
then 'animation-range-end' is set to that same <<timeline-range-name>> and ''100%''.
943+
Otherwise, any omitted [=longhand=] is set to its [=initial value=].
944+
945+
<div class="example">
946+
The following sets of declarations show an 'animation-range' [=shorthand=] declaration
947+
followed by its equivalent 'animation-range-start' and 'animation-range-end' declarations:
948+
<pre style="columns: 40ch">
949+
animation-range: entry 10% exit 90%;
950+
animation-range-start: entry 10%;
951+
animation-range-end: exit 90%;
952+
953+
animation-range: entry;
954+
animation-range-start: entry 0%;
955+
animation-range-end: exit 100%;
956+
957+
animation-range: 10%;
958+
animation-range-start: 10%;
959+
animation-range-end: normal;
960+
961+
animation-range: entry 10% exit;
962+
animation-range-start: entry 10%;
963+
animation-range-end: exit 100%;
964+
965+
animation-range: 10% exit 90%;
966+
animation-range-start: 10%;
967+
animation-range-end: exit 90%;
968+
969+
animation-range: entry 10% 90%;
970+
animation-range-start: entry 10%;
971+
animation-range-end: 90%;
972+
</pre>
973+
</div>
944974

945975
ISSUE(8438): What's the best way to handle defaulting of omitted values here?
946976

@@ -981,6 +1011,8 @@ spec: cssom-view-1; type: dfn;
9811011
at the specified point on the [=timeline=]
9821012
measuring from the start of the specified [=named timeline range=],
9831013
plus any applicable [=start delay=].
1014+
If the <<length-percentage>> is omitted,
1015+
it defaults to 0%.
9841016
</dl>
9851017

9861018
### Specifying an Animation’s Timeline Range End: the 'animation-range-end' property ### {#animation-range-end}
@@ -1020,6 +1052,8 @@ spec: cssom-view-1; type: dfn;
10201052
at the specified point on the [=timeline=]
10211053
measuring from the start of the specified [=named timeline range=],
10221054
minus any applicable [=end delay=].
1055+
If the <<length-percentage>> is omitted,
1056+
it defaults to 100%.
10231057
</dl>
10241058

10251059
## Reporting Timeline Range Progress: the ''getCurrentTime()'' method ## {#named-range-get-time}

0 commit comments

Comments
 (0)