RE: [css3-animations] Clarifying the handling of repeated animation names

[Øyvind Stenhaug:]
> 
> 
> > [Øyvind Stenhaug:]
> 
> >> <!doctype html>
> >> <style>
> >> @keyframes foo { from { margin-left: 0px; } to { margin-left: 600px;
> >> } } @keyframes bar { from { margin-left: 0px; } to { margin-left:
> >> 600px; } } p { animation-duration: 10s; animation-name: foo; } .first
> >> { animation-name: foo, bar; } .second { animation-name: bar, foo; }
> >> </style> <p>Moving right</p>
> 
> >> So if all instances of 'bar' in this example is replaced by 'foo',
> >> which case does that correspond to?
> >
> > When going from 'foo,foo' to 'foo', see above. I think it would be
> > consistent for the behavior to be consistent with start with 'foo' and
> > 2 durations.
> >
> > When starting with 'foo' and updating to 'foo,foo' then I would expect
> > the second foo to 'win' i.e. like that bar in .first.
> 
> OK, so when matching the old 'animation-name' value to a new one, repeated
> names are matched up from left to right. Sounds sensible to me.
> 
Yes; I think it makes sense for the updated animation-name value to be first
're-aligned' with the value(s) of the other animation-* properties so each
animation name gets its proper duration, timing function etc. 

Still though, you are pointing to something that is somewhat underspecified:
when animation-name is updated, under which conditions do those animations
that were already in the list continue vs. restart? If I moved foo one slot
down the name list where it will have the same duration but a different timing
function, does it restart? What if everything is the same except its iteration
count? Or its delay?

I'll log a couple of spec bugs for this. Thank you!

Received on Thursday, 17 January 2013 18:30:54 UTC