[css-animations-2] Alternate animation composite order when owning element of A and B differs
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
TLDR; Can/should we change CSS Animations and CSS Transitions composite order when owning elements differ to be sorted by creation order first?
css-animations-2 and css-transitions-2 state when the owning element of A and B differs, the animations are sorted by tree order. As far as I can tell the only time this inter-element sorting is noticeable is when returning animations from getAnimations, as animation composition behaviors only applies when animations are on the same element.
It seems that it might be more consistent (and possibly more efficient) to return animations ordered by creation (i.e. position in the global animation list). We would still need to spec that animations would be sorted by tree order when multiple animations are created at the same time. Then, the first level of sorting would be more consistent with web animations, and for implementations which maintain a global animation list it would eliminate the need for a tree traversal comparison sort, e.g. WebKit, Blink (We would need to do the same).
In practice, this means for the test Order of CSS Animations - across elements the order after appending 1 and 4 would be 2, 3, 1, 4.
It's possible there's reasons why this doesn't work, but as far as I can tell this seems simpler (more consistent with web animations, easier to implement) and does not change the visible effect, whereas the tree order is inconsistent and imposes either sorting or a data structure tracking DOM changes.
@stephenmcgruer @kevers-google @graouts @birtles, thoughts?
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
Read the animation-composite-order sections in css-animations-2, css-transitions-2, and web animations, then inspect css/css-animations/Document-getAnimations.tentative.html, especially the across-elements case. Determine whether the proposed creation-order behavior is compatible with the specifications and test expectations; done would require an agreed specification change and corresponding test updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100