Intent to Implement and Ship: CSS Transition Events
185 views
Skip to first unread message
Robert Flack
unread,
Jan 28, 2019, 12:10:39 PM1/28/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to blink-dev
fla...@chromium.orghttps://www.w3.org/TR/css-transitions-1/#transition-events
The CSS Transitions spec specifies that TransitionEvents are sent when a transition is enqueued, starts, ends, or is canceled as transitionrun, transitionstart, transitionend, and transitioncancel respectively. These events mirror the CSS animation events (already shipped) and allow developers to observe transitions in the same way as they can observe animations.
Blink currently only implements the 'transitionend' event, however there are many circumstances where a transition is not started and developers don't know for sure whether to expect a transitionend. With the transitionrun, transitionstart and transitioncancel events, developers can know when transitions are running.
Two of the top 5 starred Blink>Animation issues are for transitionstart and transitioncancel events.
Firefox: Shipped
Edge: Shipped (Except for transitionrun)
Safari: Shipped (In tech preview)
Web developers: No signals
Minor, we will be dispatching new events which we have not dispatched before. Blink currently implements only the transitionend event, which has lead to some issues for web developers due to lack of support for starting events.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robert Flack, blink-dev
Hi Rob,
Some questions:
* Do you have a collection of use cases where these events are useful for providing visual effects?
* How should these events be fit into render timing? e.g. should they be fired at rAF time or not? Should transitionend be fired post-paint but before other work?
I think the answers to the two questions are highly related, and also related to the scheduling APIs intent sent last week.
Because blink has only implemented transitionend, developers have used various setTimeout based workarounds to ensure that you get an event either at transitionend or when it has been long enough to assume the transition either never run or was canceled.
* How should these events be fit into render timing? e.g. should they be fired at rAF time or not? Should transitionend be fired post-paint but before other work?
transitionend is already shipped, and is enqueued to fire at rAF time (before the next lifecycle update) on the first main frame after the transition has ended. I.e. these events do not get fired synchronously. Naively, I would do the same for the rest of them (also to be consistent with animation events).
Brian Birtles
unread,
Jan 28, 2019, 5:57:06 PM1/28/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
* How should these events be fit into render timing? e.g. should they be fired at rAF time or not? Should transitionend be fired post-paint but before other work?
transitionend is already shipped, and is enqueued to fire at rAF time (before the next lifecycle update) on the first main frame after the transition has ended. I.e. these events do not get fired synchronously. Naively, I would do the same for the rest of them (also to be consistent with animation events).
This is covered in HTML's processing model under the step "update animations and send events" (i.e. before running rAF callbacks).
Best regards,
Brian
Joe Medley
unread,
Jan 29, 2019, 11:35:18 AM1/29/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Joe Medley, blink-dev
I've created a tracking bug - https://crbug.com/926233. I don't expect the implementation to take long - I already have a rough patch which implements transitionrun and transitionstart.
Rick Byers
unread,
Jan 29, 2019, 8:50:26 PM1/29/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robert Flack, Joe Medley, blink-dev
This seems pretty trivial to me - shipping APIs we're (nearly) at the point of being the last engine to ship. LGTM1