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

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

== [css-animations-2] Move scroll and event animation triggers to independent namespace ==
As we're adding more features or types to animation triggers #12314 and as we've mostly decided that triggers should be an independent thing controlling the playback of an animation #12119, I think that we should create triggers in a similar way to view or scroll timelines.

TLDR; I propose we have new prefixes that independent from the `animation-*` longhands for creating named triggers, e.g. `timeline-trigger-*` combined with a dashed-ident name that can be referenced from the animation-trigger property on an animation (similar to referencing an animation-timeline).

As we're adding all of these features, they each come with a long set of properties. We also expect for event triggers that the source of the events may be on a completely different element. As such, I think these should be set up in a manner similar to view or scroll timelines and referenced from the animations which want to associate with them.

We can of course also have a convenience function for creating anonymous triggers directly from the `animation-trigger` property but I think it may be confusing and inconvenient to add a bunch of `animation-trigger-*` longhand properties when triggers, like timelines, are not inherently associated with or part of the definition of an animation and which properties they have depends on the type of trigger.

cc @szager-chromium @DavMila @birtles 

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


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

Received on Friday, 13 June 2025 18:42:43 UTC