Re: [csswg-drafts] [css-values-5][css-animations-2] Anonymous inline keyframes (e.g. in a style attribute) (#10951)

I was thinking about the same recently: [mastodon post](https://front-end.social/@kizu/113211471973334178), and @bramus also commented there about it.

I wonder if we need to use the `@` there, or if it could be just a `keyframes()` function? With the implication that you would be able to assign it to a variable, and pass down the scope, exposing this specific animation for any children.

My use cases are mostly scroll-driven animations: they can often be useful for one-off properties, and often all you need a simple `keyframes { to { --foo: 1 } } `, but with the `--foo` that can be different for different cases and elements. Right now, we have to create many very similar custom `@keyframes`, but being able to use them inline would be great, as you won't have to think about naming, and they won't be reused anywhere else.

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


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

Received on Sunday, 29 September 2024 09:32:37 UTC