Skip to content

Commit ef3090a

Browse files
committed
[scroll-animations-1] Convert view-timeline-inset to take start/end pairs per timeline. w3c#7695
1 parent 8b0e33d commit ef3090a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

scroll-animations-1/Overview.bs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,19 +486,23 @@ spec: cssom-view-1; type: dfn;
486486

487487
<pre class='propdef'>
488488
Name: view-timeline-inset
489-
Value: [ auto | <<length-percentage>> ]{1,4}
489+
Value: [ [ auto | <<length-percentage>> ]{1,2} ]#
490490
Initial: 0
491491
Applies to: all elements
492492
Inherited: no
493493
Percentages: relative to the corresponding dimension of the relevant scrollport
494-
Computed value: per side, the keyword ''view-timeline-inset/auto'' or a computed <<length-percentage>> value
494+
Computed value: a list consisting of two-value pairs representing the start and end insets each as either the keyword ''view-timeline-inset/auto'' or a computed <<length-percentage>> value
495495
Animation type: by computed value type
496496
</pre>
497497

498498
Specifies an inset (positive) or outset (negative) adjustment of the [=scrollport=]
499499
when determining whether the box is in view
500-
when setting the bounds of a [=view progress timeline=].
501-
The resulting rectangle is the <dfn>view progress rectangle</dfn>.
500+
when setting the bounds of the corresponding [=view progress timeline=].
501+
The first value represents the [=start=] inset in the relevant axis;
502+
the second value represents the [=end=] inset.
503+
If the second value is omitted, it is set to the first.
504+
The resulting range of the [=scrollport=] is
505+
the <dfn>view progress visibility range</dfn>.
502506

503507
<dl dfn-for=view-timeline-inset dfn-type=value>
504508
<dt><dfn>auto</dfn>
@@ -511,12 +515,10 @@ spec: cssom-view-1; type: dfn;
511515
defines an inward offset from the corresponding edge of the scrollport.
512516
</dl>
513517

514-
The 'view-timeline-inset' property assigns its values to each side
515-
exactly as the 'margin' property does.
516-
517-
ISSUE: Should the initial value be zero or auto?
518-
519-
ISSUE: Do we need all the longhands? Seems like overkill...
518+
If 'view-timeline-name' has more names than 'view-timeline-inset' has specified inset pairs,
519+
the excess timelines use the last 'view-timeline-inset' pair.
520+
If 'view-timeline-name' has fewer names than 'view-timeline-inset' has specified inset pairs
521+
the used 'view-timeline-inset' list is truncated.
520522

521523
### View Timeline Shorthand: the 'view-timeline' shorthand ### {#view-timeline-shorthand}
522524

0 commit comments

Comments
 (0)