[web-animations-2] The handle of zero or inf total time when we convert a time-based animation to a proportional animation
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
There are two edge cases the spec doesn't specify what happen when we convert a time-based animation to a proportional animation in [web-animations-2]:
Set start delay to be the result of evaluating specified start delay / total time * timeline duration.
Set iteration duration to be the result of evaluating specified iteration duration / total time * timeline duration.
Set end delay to be the result of evaluating specified end delay / total time * timeline duration.
This spec issue may be related to #4862, the normalization of progress-based animations. I notice Chromium handles these two edge cases by (code):
- if the total time (i.e. end time) is zero, the start delay, end delay, and the iteration duration are all zero.
- if the total time is inf, that start delay and end delay are zero, and the iteration duration is
1 / iteration count.
The handle in Chromium looks reasonable to me, I'd like to use this similar way in Gecko. And it'd better to address these two edge cases in the spec as well.
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 with the Web Animations 2 section on converting a time-based animation to a proportional animation, then review the linked Chromium handling and related issue #4862. Define the specified behavior for zero and infinite total time, and consider how the resulting wording fits the surrounding specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100