RE: [css3-background] Default shadow color

I was referring to box-shadow with CSS3 animations.
http://www.w3.org/TR/css3-animations/

Maybe my understanding is old, but I thought the spec doesn't allow animation of box-shadow but does allow animation of color.

(I probably should have been clearer that by 'animate' I was referring to CSS3 animations, as opposed to JScript simulation.)

-Brian

-----Original Message-----
From: Brad Kemper [mailto:brad.kemper@gmail.com] 
Sent: Friday, March 04, 2011 11:01 AM
To: Brian Manthos
Cc: Tab Atkins Jr.; fantasai; www-style@w3.org; Estelle Weyl
Subject: Re: [css3-background] Default shadow color


On Mar 4, 2011, at 10:26 AM, Brian Manthos <brianman@microsoft.com> wrote:

> And here's another example that animates the shadow with jscript but could easily be done with an animatable 'color' property where it would be more complicated to animate box-shadow directly (if supported at all).

I don't understand. What woulnt be supported at all? What's wrong with the following line (altered):

> var div = document.getElementsByTagName("div")[0];
>   div.style.boxShadow = "0 0 50px rgb(" + i + "," + i + "," + i + ")";
> }

Sure it is SLIGHTLY longer, but seems a better choice anyway than requiring something in the source (your span) to recolor the text.

Received on Friday, 4 March 2011 19:04:41 UTC