[web-animations-2] Support setting animation currentTime and startTime using CSSNumericValue
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
The process for setting animation currentTime and startTime needs to be updated to handle CSSNumericValue inputs.
For progress based animations, I suggest we only allow CSSNumericValues that are percentages. which makes setting the time as simple as:
(new_current_time / 100) * timeline_duration
There are certain edge cases where we might be able to convert absolute time units to progress based values, but it would never be complete. If the animation is creating using only percentage values for effect iteration duration, then there is no frame of reference to be able to convert an absolute time value into a progress based value. I think it is more straightforward to simply limit the allowed input types depending on the type of timeline being used.
For time based animations we should add support for certain types of CSSNumericValues. We will need to discuss which CSSNumericValues to support.
Exceptions should be thrown at each point where incompatible input is detected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Web Animations 2 algorithms for setting animation currentTime and startTime. Resolve which CSSNumericValue types are permitted for progress-based and time-based timelines, including incompatible-input exceptions. Done means the specification defines supported units, conversion behavior, and exception points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100