W3C home > Mailing lists > Public > www-style@w3.org > May 2008

Re: [css3-background] box-shadow syntax

From: Brad Kemper <brkemper@comcast.net>
Date: Thu, 8 May 2008 09:49:38 -0700
Cc: "www-style@w3.org list" <www-style@w3.org>, Eli Morris-Heft <dai@doublefishstudios.com>
Message-Id: <A16E6A0D-E410-4C4C-8A3A-B4744924B04B@comcast.net>
To: Alan Gresley <alan@css-class.com>


On May 8, 2008, at 7:13 AM, Alan Gresley wrote:

>
> Brad Kemper wrote:
>
>>> Hi Brad, can you please explain how you can give a negative value  
>>> for a blur? I not understanding or seeing.
>>>
>>>
>>> Alan
>>>
>> You'd have to read what I wrote above that. But I will give an  
>> example:
>> What I am suggesting is that if that if you have, for instance, 4px  
>> for the blur value of box shadow, then it is a 4px blur on an outer  
>> shadow, as it is now in Webkit. But if you specify a -4px blur  
>> value then it would be interpreted as a 4px blur on an inner  
>> shadow. So the blur is still 4px wide, but the negative sign  
>> indicates that it goes on the inside and not the outside.
>
>
> Understanding, Thank you. How about:
>
> 4px(inner)
> 4px(outer)
>
> and
>
> 4px
>
> for a even blur.
>

I think that is more complex, especially for a simple outer shadow,  
and requires a new value type instead of a standard measurement value.  
A simple negative sign on the blur is fairly easy to grasp and  
remember, even if its not obvious, and makes use of the entire range  
of negative distance values that are currently meaningless for blur.

With enough imagination, one can even imagine a positive value on the  
blur being reduced a pixel at a time, until it passes zero and jumps  
into being a shadow of the negative space (also called "white space"  
or page background). Minus sign = negative space shadow; has a certain  
(only slightly convoluted) logic to it, even if the "blur" value is  
not the most intuitive place to put it.
Received on Thursday, 8 May 2008 16:50:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:06 GMT