Re: [css3-background] box-shadow syntax

On May 9, 2008, at 4:18 PM, Alan Gresley wrote:

> For me a minus value is no value at all if we are talking about a  
> width. Having a -4px width doesn't sound right and can be mixed up  
> with minus (x/y) positions of a shadow.

Well, I was thinking outside the box a little. Using the minus sign as  
a marker to indicate something other than a negative amount. But it  
may cause problems with a "parseInt" type of operation that may be  
part of the normal parsing, or may be part of JavaScript operations on  
it, so that may be a valid reason not to do it that way.

>
>
> A good example is this.
>
> {box-shadow:-4px -4px blue;}
>
> Which missing value is going to be treated as '0'. I it the vertical  
> offset or is it and inner blur? Eli, this is more a question for Brad.

Same as in the current working draft:

If there are only 2 distance measurements, then they are offsets. If  
there is a third one, then it is blur radius. I would add that, with  
the minus sign idea that if that third number includes a minus sign  
before it, then it the shadow is inner instead of outer.

Otherwise, with Eli's notation, then there is no negative blur.  
Instead, the presence of a separate word, "inner", would mean that it  
was an inner blur. If that word was "outer", it would be the same as  
if the word was left out (it would be an outer shadow).

Received on Saturday, 10 May 2008 04:06:30 UTC