Re: [csswg-drafts] [css-animations] Proposal: Add a way to make the animation timing function apply to the whole animation (#8881)

> i.e. there's no cascade from (pseudo-)element to keyframes.

Would this be an exception to the default behavior? Perhaps my mental model of `@keyframes` is wrong, but I've always viewed it as that properties do cascade to keyframes, with like successive keyframes getting higher specificities. For instance, the way I see it in the animation below, the background animates from red to blue because the implicit `from` keyframe gets `background-color: red` from the cascade, and tweening to the `to` keyframe effectively just does a CSS transition.
```css
.my-element {
    background-color: red;
    animation: colors 2s 3s;
}

@keyframes colors {
    to { background-color: blue; }
}
```

As a result, I would expect `animation-easing` to similarly cascade to each keyframe, but it would still only describe the easing of the whole animation. And consequently, modifying `animation-easing` within a keyframe would have the outcome of changing the effect-wide timing function for the duration of that keyframe, potentially enabling some very unique animations. Personally, if `animation-easing` did not cascade to keyframes, it would go against my intuition and feel like "another thing I have to remember".

-- 
GitHub Notification of comment by denk0403
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8881#issuecomment-1569696325 using your GitHub account


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

Received on Wednesday, 31 May 2023 08:05:58 UTC