RE: [css3-animations] invalid values in keyframes

>Agreed.  It should behave as though 'color' was not specified in the 50% keyframe.
>
>So, to answer the original question, in that animation, color should animate from red at 0% to yellow at 100%

Is this defined somewhere? I see a note in the ED and a bug tracking that the behavior needs to be defined in the spec, but no other indicator that this is how keyframes with missing properties should behave. I do agree that this is how it should animate. Just wondering if there's a discussion out there that could be used to guide behavior in other similar cases or edge cases.

-----Original Message-----
From: L. David Baron [mailto:dbaron@dbaron.org] 
Sent: Monday, November 14, 2011 6:39 PM
To: Tab Atkins Jr.
Cc: Jennifer Yu; www-style@w3.org
Subject: Re: [css3-animations] invalid values in keyframes

On Monday 2011-11-14 18:35 -0800, Tab Atkins Jr. wrote:
> On Mon, Nov 14, 2011 at 6:31 PM, Jennifer Yu <Jennifer.Yu@microsoft.com> wrote:
> > What should this animation look like?
> >
> > @keyframes anim1 {
> >                 0% {color: red; left: 10px;}
> >                 50% { color: notARealColor; left: 20px; }
> >                 100% { color: yellow; left: 90px; } }
> >
> > Should the specified color property value at 50% effectively be 
> > ignored as if it were not specified? Or should the whole animation 
> > of the color property be ignored? Or, taking it to a further 
> > extreme, should the entire animation be ignored?
> >
> > It seems more natural to just ignore the specified color value. 
> > However, preventing some of the animation from running would be a 
> > clear indicator to a web author that there’s a problem with his defined animation.
> 
> That would break forward-compatible parsing.  Only the single invalid 
> declaration should be ignored, so that authors can do the standard 
> "provide multiple versions of a property" style of fallback.

Agreed.  It should behave as though 'color' was not specified in the 50% keyframe.

So, to answer the original question, in that animation, color should animate from red at 0% to yellow at 100%, and left should animate from 10px at 0% to 20px at 50% to 90px at 100%.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Tuesday, 15 November 2011 02:57:07 UTC