Re: [css-animations] Proposal for animation triggers, timebases and additive behavior

On Wed, Sep 10, 2014 at 2:10 PM, Dean Jackson <dino@apple.com> wrote:

>
> Yes, that's a tricky one. So far my prototype avoids that by calculating
> the end points in advance, so that if your animation moves the element
> vertically on the page (or increases the height), you don't get into a
> weird situation. Obviously that's not a real solution.
>
> However, your fundamental invariant has already been breached a few years
> ago. e.g.
>
> div {
>   transition: transform 1s;
> }
>
> div:hover {
>   transform: scale(0.5);
> }
>
> Depending on where your pointer is, you get something that flip flops
> between styles as the style changes the geometry.
>

That's true, but is that something we want to spec?

I fear that it will be a lot easier for Web authors to accidentally depend
on UA-defined (aka "whatever our implementation does") cycle breaking
behavior using these animation features than using :hover.

This was actually my first draft - we only had a single property. However,
> it's the other way around from what you say, animation-timebase:scroll
> probably depends on animation-trigger:scroll. You want the ability to
> trigger a normal time-based animation when the user hits a point in the
> page (e.g. fade this thing in as soon as it comes onto the page), and also
> the ability for the scroll position to affect the duration (e.g. fade this
> thing in as you scroll it onto the page).
>
>
> You see both cases in trendy web sites these days.
>

OK.


> For animation-behavior:add, in what order should the animations be applied?
>
>
> The order in which they are specified, just like regular animations. This
> means if you had 4 animations all trying to change transform:
>
> animation-name: a, b, c, d;
> animation-behaviour: replace, add;
>
> ...you'd only see c+d (since the list repears, making c replace the value
> of a+b).
>

Ah right. I got confused into thinking that this would let multiple
animation rules stack. I suspect authors will make the same mistake but
maybe that can't be avoided...

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.

Received on Wednesday, 10 September 2014 02:27:38 UTC