[csswg-drafts] [css-animations-2] interaction between the `timeline` property and `animation-timeline` property (#11054)

graouts has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-animations-2] interaction between the `timeline` property and `animation-timeline` property ==
CSS Animations Level 2 has a [section](https://drafts.csswg.org/css-animations-2/#animations) detailing how setting properties via the Web Animations APIs can override related CSS properties. For instance:

> After a successful call to [play()](https://drafts.csswg.org/web-animations-1/#dom-animation-play) or [pause()](https://drafts.csswg.org/web-animations-1/#dom-animation-pause) on a [CSSAnimation](https://drafts.csswg.org/css-animations-2/#cssanimation), any subsequent change to the [animation-play-state](https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state) will no longer cause the [CSSAnimation](https://drafts.csswg.org/css-animations-2/#cssanimation) to be played or paused as defined in [ยง 4.5 The animation-play-state property](https://drafts.csswg.org/css-animations-2/#animation-play-state).

This section makes no mention of setting the `timeline` property of an animation. I believe the spec should detail what happens when setting `animation-timeline` after the `timeline` property has been modified via the JS bindings.

Additionally, should setting the `effect` property have any effect on further changes to the `animation-timeline` property? Currently, the spec says so:

> After successfully setting the [effect](https://drafts.csswg.org/web-animations-1/#dom-animation-effect) of a [CSSAnimation](https://drafts.csswg.org/css-animations-2/#cssanimation) to null or some [AnimationEffect](https://drafts.csswg.org/web-animations-1/#animationeffect) other than the original [KeyframeEffect](https://drafts.csswg.org/web-animations-1/#keyframeeffect), all subsequent changes to animation properties other than [animation-name](https://drafts.csswg.org/css-animations-1/#propdef-animation-name) or [animation-play-state](https://drafts.csswg.org/css-animations-1/#propdef-animation-play-state) will not be reflected in that animation. Similarly, any change to matching [@keyframes](https://drafts.csswg.org/css-animations-1/#at-ruledef-keyframes) rules will not be reflected in that animation. However, if the last matching `@keyframes` rule is removed the animation must still be canceled.

But the timeline being a property of the animation, and not the effect, should `animation-timeline` be excluded here?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11054 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 21 October 2024 09:30:32 UTC