Re: [csswg-drafts] [css-animations-2] Declarative syntax for GroupEffects (#9554)

> Great, that's good test, although in your example there's no case of multiple animations on the same element. So it's a case 4 but not really requiring the `@groupeffect` part.

Oh, you're right. I think I originally intended that the dialog would both translate and scale a little but I forgot to add the scale part.

Overall it looks very promising. It's great to see the negative delay for overlap and the decreasingly staggered start times too.

One thing I didn't understand was in the following:

```css
 group-effect:
    --showModal 2s sequence,
```

Why do we need to define the length of the group here? For groups in Web Animations 2, by default they calculate their length from their children (see [1](https://drafts.csswg.org/web-animations-2/#the-intrinsic-iteration-duration-of-a-group-effect) and [2](https://drafts.csswg.org/web-animations-2/#the-intrinsic-iteration-duration-of-a-sequence-effect)). This can be overridden to make a group clip its children or be extended but the typical usage would be to use the intrinsic duration.

I know that in the context if finite timelines we've also talked about allowing groups to behave like temporal flexbox containers where you'd set the group duration to 2s and let children specify their duration as a fraction of that. I can find the issues where we discussed that if that's helpful. That would certainly be great to have in future but I don't think that's the case in this example is it?

I guess what I'm really saying is that I didn't following the second half of this line:

```css
--showContent / --showModal 2 1s start calc(200ms * log(effect-index() + 1));
```

It looks like we're defining some basic timing properties that apply to each child in the group but I wonder if that's the right place to do it. Given that groups and children can have their duration defined separately, maybe the child timing properties should only be defined on the child.

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


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

Received on Tuesday, 30 January 2024 03:03:56 UTC