Re: [csswg-drafts] [scroll-animations-1] Entry/Exit Transitions for View Timeline effects (#7044)

> * Define TimelinePhase API
>   ```
>     interface TimelinePhase { 
>       readonly DOMString name;
>       readonly double startTime;
>       readonly double endTime;
>     }
>   ```

How does a developer get access to this TimelinePhase instance? In the CSS API the phase is named, wouldn't they name the phase in the JS api as well? E.g. the same as naming fill: 'both' | 'forwards' | 'backwards' | 'none'?

Minor nit: These times should be CSSNumberish to match the units used by the timeline based on how we resolve issue #7045, whether that's pixels or percentages.

> ViewTimeline defines the following phases:

Do we need a phase such as `cover` which would be from entry to exit or would this be the `active` phase?

> Open Questions
> 
> * Are these called phases, or something else, given we have these phases already: https://www.w3.org/TR/web-animations-1/#the-timelinephase-enumeration

We may be able to remove the existing timeline phase (Timeline phase was added to be able to disambiguate time 0 when the scroller actually reaches the 0 position from before reaching that position - which could be more easily handled by allowing times outside of the timeline's "active" range, see #4325) , or simply augment the timeline phase with these new phases.

> * How are `entry` and `exit` distinguished? Is it by writing mode of the scroll container, or are we tracking where the box originally came into view from somehow?

My vote would be for writing mode of the container. I don't think we should have hysteresis based on scroll direction.



-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7044#issuecomment-1059339349 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 4 March 2022 16:58:01 UTC