- From: fantasai via GitHub <noreply@w3.org>
- Date: Mon, 21 Jul 2025 22:35:24 +0000
- To: public-css-archive@w3.org
> 1. Currently triggers, mostly relevant to timeline triggers, contain the state of the effect they apply on the animation's playback. With separate triggers used for start/end, where does that state lives? Or perhaps this design makes them stateless? Yes, this makes them stateless. An animation that was started by a timeline trigger can be ended by an event trigger; etc. Each trigger's start and end criteria are defined independently of each other: a timeline trigger starts when you switch from being outside the start range to inside, and ends when you switch from being inside the continue range to outside; similar for event triggers. If we need to pair them up, e.g. so that certain end triggers can only end animations started by certain start triggers, we'd need to do something a little different. For example, we could make space-separated list of events and actions be paired between as corresponding start and end triggers, and use brackets to batch multiple actions as an interchangeable set. We'd need to make this decision now, though, because the default behavior we're currently proposing for when the author provides multiple triggers (all are interchangeable) would have to be explicitly written as a batched set (wrapped in brackets). > 2. We probably want animation-start-trigger-action to just be once | always, since the alternating behavior is part of the exit/end triggering. Then you have the following mapping: once -> once, repeat -> always / reset, alternate -> always / direction, state -> always / pause. Ah, ok, so we'd have animation-start-trigger-action: once | always animation-end-trigger-action: reset | pause | alternate ? I guess it depends, do you want to alternate the direction only if there's an end trigger flipping the direction, or every time the start trigger is initiated (regardless of whether there was an end)? Do we need both options? Which I guess raises the question of, do we want a start trigger to be able to restart a playing animation, or only trigger if the animation is stopped/paused, and do we need control over that? > 3. I don't get what self is? What does it do? Exactly as @DavMila says, `self` refers to an *unnamed* trigger declared on the element itself. Just lets you do some convenient, probably common, cases like clicks on the element triggering an animation on the element, without having to mint a name (because you're not trying to communicate across elements). We're open to better keyword names here. :) > 4. I assume wherever you put a trailing | that means a <dashed-ident> can be used, right? Yeah. That's a markup error in the comment, fixed. :) > 5. If an animation has both a start timeline trigger with a continue range, and an end trigger with its own range, which one is used? In timeline triggers, `range` is used for start triggers, and `continue` for end triggers. If you define both on a trigger but only use it as a start trigger, the continue range is just ignored, just like an `event-trigger-end-type` is ignored if you use an event trigger only as a start trigger. ~fantasai and TJ -- GitHub Notification of comment by fantasai Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12336#issuecomment-3099669179 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 21 July 2025 22:35:25 UTC