Skip to content

Commit

Permalink
[scroll-animations-1] Use logical coords for scroll offsets. #7752
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Mar 27, 2023
1 parent 2323531 commit c72a078
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions scroll-animations-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -555,23 +555,22 @@ spec: cssom-view-1; type: dfn;
: <dfn>startOffset</dfn>
:: Represents the starting (0% progress) scroll position
of the [=view progress timeline=]
as a length offset (in ''px'') from the scroll origin.
as a length offset (in ''px'') from the [=scroll origin=].
Null when the timeline is [=inactive timeline|inactive=].

: <dfn>endOffset</dfn>
:: Represents the ending (100% progress) scroll position
of the [=view progress timeline=]
as a length offset (in ''px'') from the scroll origin.
as a length offset (in ''px'') from the [=scroll origin=].
Null when the timeline is [=inactive timeline|inactive=].
</dl>

Note: The value of {{ViewTimeline/startOffset}} can be greater than {{ViewTimeline/endOffset}},
Note: The values of {{ViewTimeline/startOffset}} and {{ViewTimeline/endOffset}}
are relative to the [=scroll origin=], not the [=physical=] top left corner.
Depending on the [=writing mode=] of the [=scroll container=],
they therefore might not match {{Element/scrollLeft}} or {{Element/scrollTop}} values,
for example in the [=horizontal axis=] in a right-to-left (''rtl'') [=writing mode=].

ISSUE: This makes the offsets compatible with the way scrollLeft and scrollTop work,
which go negative from zero in RTL scroll containers,
is this how we want it to work here?

Inherited attributes:

<dl>
Expand Down

0 comments on commit c72a078

Please sign in to comment.