Re: [csswg-drafts] [web-animations-1] Alternative to FillAnimation: replace events (#3689)

> I think it'd be awesome if we could provide some built-in function on an effect to apply its animated values directly to the target, with potentially a list of properties to commit.

I definitely agree we want to make this easier. A few comments:

* It doesn't make it clear that we're committing the _computed_ style. And I think we want to commit the computed style since the fill value could be the result of interpolating 70% between `50em` and `200px` and we don't have a way of representing that as a specified value yet (although in future perhaps we ought to have `interpolate(50em, 200px, 70%)`?). We could probably just fix that with naming, e.g. `commitComputedStyle`.

* It might not scale well to group effects. Which effect do you call it on? Do you have to iterate over all of them? We could probably fix that by just moving this method to `Animation` -- that would also take care of iterating over all the effects and committing their styles to the corresponding target elements. If we need more fine-grained controls, we could add it to `KeyframeEffect` as well later.

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

Received on Tuesday, 2 April 2019 00:49:45 UTC