[animation-triggers-1] Update animation triggers spec - #14199
Conversation
This adds missing </dfn> and </div> tags.
This moves the details of AnimationTrigger to the animation-triggers-1 spec. This is mostly a copy-paste of the content from web-animations-2, with a few adjustments: - Drops the Animation frame loop update portion - Drops the Animation mixin interface update portions - Drops the KeyframeAnimationOptions 'trigger' addition (these were structured as ammendments to web-animations-1 but are no longer relevant anyway.) - Adjusts the level of some headings so bikeshed is happy.
| All triggers have a <dfn export for=CSS>trigger name</dfn>. | ||
| Once a trigger is defined, a <dfn export for=CSS>trigger instance</dfn> is | ||
| created in the scope managed by the 'trigger-scope' property. | ||
| For each specified triggering element, a <dfn export for=CSS>trigger attachment</dfn> |
There was a problem hiding this comment.
This has to do with "combining" triggers that declare the same name right? The resolution was that, at least to start, we would do this for event triggers but not for timeline triggers. Could we have separate subsections describing how event-trigger names are handled and how timeline-trigger names are handled?
There was a problem hiding this comment.
Right, that's why I wrote above "and some pending issues as proposals" (:
See issue: #14089
So I went ahead and proposed a syntax, but this is still WIP, of course
| If multiple elements define [=triggers=] with the same [=trigger name=], | ||
| the [=trigger=] defined by the later element in [=tree order=] is used. | ||
| If multiple elements declare [=triggers=] with the same [=trigger name=] | ||
| they are combined together as separate [=trigger attachment|attachments=] for [=trigger instances=] |
There was a problem hiding this comment.
Similar request as with the trigger name section above: could we have separate sections clarifying how the names are treated differently?
There was a problem hiding this comment.
Same as above. I think it's important to resolve this issue sooner rather than later
| ## Timeline Trigger Ranges ## {#timeline-trigger-ranges} | ||
|
|
||
| A [=timeline trigger=] attachment can have one or more associated timelines. | ||
| When <em>all</em> of the [=trigger attachment|attachment=]'s associated |
There was a problem hiding this comment.
I think that for timeline triggers, since we aren't combining the names, there isn't a difference between attachment and instance?
Side note: I think I agree with the below that with multiple timelines, activation requires all the timelines but deactivation requires only a single timeline to exit the active range.
There was a problem hiding this comment.
Yes, in case we don't hoist the state to the top of the scope then they practically become the same
|
|
||
| <pre class='idl'> | ||
| [Exposed=Window] | ||
| interface AnimationTrigger { |
There was a problem hiding this comment.
I suppose this is just a copy-paste and it's fine to update this in a follow-up patch.
DavMila
left a comment
There was a problem hiding this comment.
Thanks for uploading this.
Mostly LGTM.
We should clarify that timeline-trigger names are treated differently from event-trigger names.
The copy-pasted interface needs to be updated.
Include latest resolutions and some pending issues as proposals.