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

Re: [css3-background] Default shadow color

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 11 Mar 2011 09:44:01 -0800
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org
Message-Id: <F76726C3-13C4-4B57-A122-5BF972BABB82@gmail.com>
To: Lea Verou <leaverou@gmail.com>
I agree that the way Firefox 4 handles it is best.

On Mar 10, 2011, at 9:19 PM, Lea Verou wrote:

> Hi,
> 
> Just wanted to point out that shadow interpolation from (or to) 'none' (the initial value) is also undefined.
> This results to each browser doing a different thing: http://jsfiddle.net/leaverou/3gw4K/
> - Webkit ignores inset until the transition is finished
> - Opera doesn't transition at all
> - Gecko seems to get it right (right as in looks smooth and not weird)
> 
> Lea Verou (http://leaverou.me | @LeaVerou)
> 
> 
> On 5/3/11 00:23, fantasai wrote:
>> On 03/04/2011 02:11 PM, Simon Fraser wrote:
>>> On Mar 4, 2011, at 1:07 PM, Brian Manthos wrote:
>>> 
>>>>> How do you interpolate from inset to non-inset (and the reverse)?
>>>>> 
>>>>> from {
>>>>>    box-shadow: 0 0 0 blue;
>>>>> }
>>>>> to {
>>>>>    box-shadow: 0 0 0 red inset;
>>>>> }
>>>> 
>>>> Adjusting the example:
>>>> from {
>>>>    box-shadow: 0 0 127px rgb(0,0,254);
>>>> }
>>>> to {
>>>>    box-shadow: 0 0 127px rgb(254,0,0) inset;
>>>> }
>>> 
>>> I was just thinking about this recently when fixing a WebKit bug.
>>> 
>>> I think animating from inset to non-inset shadows automatically is too magical,
>>> especially when both have different spreads. I think we should state that you
>>> cannot transition between shadows of different types.
>>> 
>>> Of course, animating from no shadow to either type of shadow should work.
>> 
>> You could animate the offsets and spreads to zero and then transition from
>> zero to the other shadow type. Theoretically. :) But it probably makes more
>> sense to not allow it. The author could animate two shadows if they want
>> that kind of transition:
>> 
>>  box-shadow: 0 0 127px rgb(0,0,254), 0 0 rgb(254,0,0);
>> to
>>  box shadow: 0 0 rgb(0,0,254), 0 0 127px rgb(254,0,0);
>> 
>> ~fantasai
>> 
> 
Received on Friday, 11 March 2011 17:44:36 GMT

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