Re: [csswg-drafts] [css-animations-2] Add animation-trigger for triggering animations when an element is in a timeline's range (#8942)

> > Demo using it: https://flackr.github.io/web-demos/scroll-triggered/
> 
> Nice!
> 
> Looking at the code, I see this:
> 
> ```css
> animation-trigger: view() alternate contain 0% contain 100%;
> ```
> 
> I assume this would also work, because `contain` expands to `contain 0% contain 100%`:
> 
> ```css
> animation-trigger: view() alternate contain;
> ```
> Same with this below, which expands to `entry 100% normal`:
> 
> ```css
> animation-trigger: view() alternate entry 100%;
> ```
> 
> Am I correct in this?

No, because contain 100% is not the same thing as the infinite behavior (anything after the start point) that the polyfill implements. If we want to support a single trigger point that is active for any position after it we need to have different behavior from the default animation range single value.




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


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

Received on Saturday, 16 September 2023 16:05:54 UTC