Re: [csswg-drafts] [css-animations-2] Move scroll and event animation triggers to independent namespace (#12336)

Responding to some of @ydaniv's raised concerns:

> we already have all these properties

They are only in an editor's draft spec and not yet implemented by any browsers. Now is the best time to change it if it makes sense to do so. We effectively do not yet have these properties because it has not been implemented.

> even if we do this, animation-trigger still remains

animation-trigger is analogous to animation-timeline. When set it sets the associated trigger of the respective coordinated animation. I think that all of the arguments against doing this could also have been made of scroll and view timelines. We could have added `animation-timeline-range-start`, `animation-timeline-range-end`, `animation-timeline-axis`, `animation-timeline-inset` etc. However, we decided to set up timelines separately.

> but still there's an option we want to have timeline used on specific elements, give it a name, you still have to use yet another element

For event timelines it is also useful to have a distinct associated element. When you don't need this an anonymous trigger might do, similar to view or scroll timelines, e.g. `animation-trigger: timeline(once view())`

> still need another element inbetween for another property to reference that name

Can you explain this? You can set up and use a trigger on the same element easily, and also use it for multiple animations in the coordinated animation list if needed.

> still need this extra property

Does having an anonymous trigger construction not alleviate this?

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


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

Received on Wednesday, 16 July 2025 17:35:37 UTC