diff --git a/css-animations-2/Overview.bs b/css-animations-2/Overview.bs index c0e84664b34..070e600bba9 100644 --- a/css-animations-2/Overview.bs +++ b/css-animations-2/Overview.bs @@ -723,14 +723,14 @@ Declaring Animation Triggers The 'animation-trigger' properties are [=reset-only sub-properties=] of the 'animation' [=shorthand=]. -## The 'animation-trigger-type' property ## {#animation-trigger-type} +## The 'animation-trigger-behavior' property ## {#animation-trigger-behavior} -The 'animation-trigger-type' property specifies the [=animation trigger type=] +The 'animation-trigger-behavior' property specifies the [=animation trigger behavior=] of the [=animation trigger=].
-Name: animation-trigger-type -Value: <-<single-animation-trigger-type> = once | repeat | alternate | state +<single-animation-trigger-behavior> = once | repeat | alternate | state -The values of 'animation-trigger-type' have the following meaning +The values of 'animation-trigger-behavior' have the following meaning for an [=animation trigger=] that enters its [=animation trigger/active interval|active interval=]: -># +Name: animation-trigger-behavior +Value: < ># Initial: once Applies to: all elements Inherited: no @@ -740,12 +740,12 @@ Animation type: not animatable Canonical order: per grammar
-<single-animation-trigger> = <# Animation Events # {#events} diff --git a/web-animations-2/Overview.bs b/web-animations-2/Overview.bs index bfef120193b..7e244743076 100644 --- a/web-animations-2/Overview.bs +++ b/web-animations-2/Overview.bs @@ -2372,76 +2372,93 @@ and are attached to an [=animation attachment range|attachment range=]. Issue: Should there be any effect of triggers on scroll-driven animations? -### Animation Trigger Types ### {#trigger-types} +### Animation Trigger Internal State ### {#trigger-state} -The behavior an [=animation trigger=] applies to its associated [=animation=]’s -playback is defined by its animation trigger type, and -depending on its [=animation trigger state|state=] can apply one of two -distinct behavior types: [=animation trigger state/primary=] or [=animation trigger state/inverse=]. -Given an internal |did trigger| flag, the values of [=animation trigger type=] -can be one of the following: +An [=animation trigger=] |trigger| +has an internal boolean did trigger flag, which is initially false, +and an internal state with +these possible values: -> || [ none | auto | [ [ < > | < > | < > ] [ normal | < > | < > < >? ]{0,4} ] ] +<single-animation-trigger> = < > || [ none | auto | [ [ < > | < > | < > ] [ normal | < > | < > < >? ]{0,4} ] ]
null
, is as follows:
- 1. Let |old timeline| be the current [=timeline=] of |trigger|, if any.
+ 1. Let |old timeline| be the current value of |trigger|.{{AnimationTrigger/timeline}}, if any.
1. If |new timeline| is the same object as |old timeline|, abort this procedure.
- 1. Let the [=timeline=] of |trigger| be |new timeline|.
+ 1. Set |trigger|.{{AnimationTrigger/timeline}} to |new timeline|.
- 1. Run the procedure to [=updating animation trigger state=] for |trigger|.
+ 1. Run the [=updating animation trigger state=] procedure for |trigger|.
### Updating Animation Trigger State ### {#updating-trigger-state}
auto
:: Update the description as:
- > Fill backwards and forwards when applied to an
- > {{GroupEffect}} and no fill when applied to an
- > {{KeyframeEffect}}.
+ > Fill backwards and forwards when applied to a
+ > {{GroupEffect}} and no fill when applied to a
+ > {{KeyframeEffect!!interface}}.
GroupEffect
interfaceKeyframeEffect
interfacespartial interface KeyframeEffect { @@ -3286,7 +3300,7 @@ partial interface KeyframeEffect { : KeyframeEffect (target, keyframes, options) -:: Amend step 5 of the procedure to create a new {{KeyframeEffect}} object as +:: Amend step 5 of the procedure to create a new {{KeyframeEffect!!interface}} object as follows: 5. If options is a {{KeyframeEffectOptions}} object, @@ -3295,13 +3309,13 @@ partial interface KeyframeEffect { corresponding value from options. When assigning these properties, the error-handling defined for the - corresponding setters on the {{KeyframeEffect}} interface is applied. + corresponding setters on the {{KeyframeEffect!!interface}} interface is applied. If any of those setters require an exception to be thrown for the values specified by options, this procedure must throw the same exception and abort all further steps. : KeyframeEffect (source) -:: Amend the procedure to create a new {{KeyframeEffect}} object with the +:: Amend the procedure to create a new {{KeyframeEffect!!interface}} object with the same properties as {{KeyframeEffect/KeyframeEffect(source)/source}} to include setting the iteration composite operation from source on effect. @@ -3422,7 +3436,7 @@ callback EffectCallback = undefined (double? progress, Animation animation);-An {{EffectCallback}} is called each time an {{KeyframeEffect}} object +An {{EffectCallback}} is called each time an {{KeyframeEffect!!interface}} object with which it is associated is updated.
dictionary AnimationTriggerOptions { AnimationTimeline? timeline; - AnimationTriggerType? type = "once"; + AnimationTriggerBehavior? behavior = "once"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart = "normal"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd = "normal"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeStart = "auto"; @@ -3710,10 +3718,10 @@ dictionary AnimationTriggerOptions { The timeline to which the trigger is associated. If not specified, the trigger is associated with [=default document timeline=]. - : type + : behavior :: - The type of trigger to create. - If not specified, the trigger is of type ''animation-trigger-type/once''. + The behavior of the trigger. + If not specified, the trigger's behavior is ''animation-trigger-type/once''. : rangeStart :: @@ -3737,30 +3745,30 @@ dictionary AnimationTriggerOptions {
AnimationTriggerType
enumerationAnimationTriggerBehavior
enumeration-enum AnimationTriggerType { "once", "repeat", "alternate", "state" }; +enum AnimationTriggerBehavior { "once", "repeat", "alternate", "state" };