Re: [csswg-drafts] [scroll-animations-1] What's the point of animation-range? (#7901)

> Once animation-delay becomes a shorthand, animation will need to expand into the longhands: animation-delay-start and animation-delay-end. So changing animation-delay doesn't have to affect animation, it depends on how it's defined.
> scroll-animations-1 doesn't seem to be changing animation, so its grammar is still as defined in https://drafts.csswg.org/css-animations-1/#propdef-animation, which uses <time>,

Of course, that's what I meant above. scroll-animations-1 depends on the definition of `animation` for defining an animation with a scroll-linked timeline, and it's using `<time>`, though, IIUC, the intent is to be able to set `animation-delay` in `animation` as ranges, for example:
```css
animation: 1s linear contain fade-in my-view-timeline;
```

Currently `animation` doesn't contain `animation-range` in its definition, and that's why it depends on using delay, and is still required for delay to expand also to ranges.

Unless, my suggestion above, we can change the definition of `animation` and have an alternative definition, which only uses ranges, and not time, and thus will make your original suggestion valid, here:

> But then maybe restrict animation-delay to <time>{1,2}# and animation-range to [ <timeline-range-name> <percentage>? ]{1,2}# or something?

And thus make them mutually exclusive.

> open a new issue I guess

I'll do that 👍 

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


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

Received on Sunday, 23 October 2022 21:27:31 UTC