W3C home > Mailing lists > Public > www-style@w3.org > November 2011

Re: [css3-animations][css3-transitions][css3-background] Animating box-shadow

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 1 Nov 2011 16:24:45 -0700
Cc: www-style list <www-style@w3.org>
Message-Id: <BE235155-8C4C-4909-A914-7610EF0782EC@gmail.com>
To: Brian Manthos <brianman@microsoft.com>

On Nov 1, 2011, at 4:02 PM, Brian Manthos wrote:

> Some thoughts after rereading Brad's description a 3rd time...
> 
> a. The transition should be fluid, not integral stepped.  Brad's description doesn't say otherwise but it's easy to read too much into the "1px" reference in step 5.

I did not mean to imply stepping.

> b. It vastly simplifies the problem space to think of inner spreads as equivalent to negative outer spreads.  Similarly for offsets.
> c. Incorporating 'b', the algorithm gets much simpler to describe mathematically as each property transitions along a single axis linearly without backtracking.

I have a harder time thinking of it that way. Do spreads still get to zero at the same time as everything else?

> d. Normalizing across fields (offsets, spreads) so that they transition at the same rate is definitely important.
> e. WG must decide whether they want "cross-inset" transitions to be evenly split between inset and outset renderings or not.  I suggest "not".  The math is simpler and the rendering is more flexible.  If people want a half-inset, half-outset rendering it's easy to do that with an animation that has an additional middle state of "0 0 0 0 transparent".

IMO, if the distance measurements shadows do not go through zero at the same time, then it is not a smooth, believable effect, as there will end up being a jump when a bunch of shadow sticking out of the border box is suddenly found inside the padding box, facing the other way. 

Also, I had intended that color would just be one transition, independent of when the distance measurements hit zero.

> f. Color transitions with rgba.  Premultiplied?  Non-premultiplied?  One or the other depending on another property?

Is this question specific to "cross-inset" transitions, or just in general for box-shadow? I don't see any reason for it to be different from other color transitions, do you?
Received on Tuesday, 1 November 2011 23:52:50 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT