W3C home > Mailing lists > Public > www-style@w3.org > January 2013

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

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 17 Jan 2013 13:08:50 +0100
To: "www-style@w3.org" <www-style@w3.org>, "Sylvain Galineau" <sylvaing@microsoft.com>
Message-ID: <op.wq11c0zhbunlto@oyvinds-desktop>
On Thu, 17 Jan 2013 00:22:15 +0100, Sylvain Galineau  
<sylvaing@microsoft.com> wrote:

> [Ø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.

-- 
Øyvind Stenhaug
Opera Software ASA
Received on Thursday, 17 January 2013 12:09:25 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT