- From: Yehonatan Daniv via GitHub <noreply@w3.org>
- Date: Fri, 05 Dec 2025 14:40:53 +0000
- To: public-css-archive@w3.org
> I think that one-sided triggers are a very common and important use case that we should make as easy as possible, and this was explicitly identified as a goal in the original ideation issue https://github.com/w3c/csswg-drafts/issues/8942. I don't quite agree here. All of the examples @bramus showed above either don't have a trigger, or they were implemented watching scroll positions for legacy reasons. I doubt how common and important that use-case really is. It surely exists, and we should solve it, and we have, sort of, since `scroll` only "breaks out" of `cover`, but not the nearest scroll container. I checked a bit, `anime.js` just watches the `scroll` event, but replicates what `view()` does, and `Motion` uses `IntersectionObserver`. I argue that the common and important use-case is to follow behavior that's closer to `IntersectionObserver` or even `ViewTimeline`. > Wanting to trigger an animation only when an element is in view. If the other specifies `animation-trigger: --t view() contain` that will today do this, but if we assume that is any offset >= `contain 0%` then they'd have to explicitly list the endpoint, e.g. `animation-trigger: --t view() contain contain`. Exactly, and I don't that the exception here justifies breaking consistency. > Maybe there is some syntax we could add to represent the infinity or -infinity default for the first / last value in a range which could address both of these, while still being more ergonomic than having to specify scroll as the other point, e.g. I'm totally fine with that if we have one. But we probably want something that escapes nearest scroll container, like `root-start`/`root-end`. -- GitHub Notification of comment by ydaniv Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11932#issuecomment-3617198273 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 5 December 2025 14:40:54 UTC