-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Description
Hey all, in a breakout session at the Paris f2f earlier this year we settled a lot of lingering questions about the proposed animation-trigger feature. However, not all impls were in that breakout, and when @fantasai showed up at the end, she had some concerns with the syntax.
I've reflected all the resolutions we took in the breakout into the Animations 2 spec now, so we can get review in a reasonable manner. (See the 'animation-trigger' property, and the new Triggers section.) You can also view the changes individually, and the associated issues they were addressing, in PR #13009.
We hope to get discussion (and hopefully approval!) of the design we've settled on here in an upcoming telcon. Briefly, the design is:
- 'animation-trigger' is added as a reset-only sub-property of the 'animation' shorthand. It lists a trigger name, and an action to take when the trigger is activated. (or two, if the trigger can activate in multiple ways)
- Triggers are defined on the triggering element - some element with visibility of the timeline you want to trigger on, or an element you want to respond to events targeting.
- Triggers are global, with a simple name-clash resolution, essentially identical to 'anchor-name'. We anticipate adding a 'trigger-scope' identical to 'anchor-scope'. (We also resolved to shift timelines to use this same global+scope model to get everything consistent, rather than the current "define for a subtree and lift it higher with scope".)