Re: [css3-background] box-shadow syntax

Alan Gresley wrote:
> Understanding, Thank you. How about:
> 
> 4px(inner)
> 4px(outer)
> 
> and
> 
> 4px
> 
> for a even blur.

I want to remind everyone that we're talking about a shadow here, not a blur 
surrounding the element in question, so the expectation is for a shadow, outside 
and to one side of the object. To get an outer glow, we need:

box-shadow: 2px 2px 1px black, 2px -2px 1px black, -2px 2px 1px black, -2px -2px 
1px black;

To get an inside glow, we should (under Brad's suggestion) have:

box-shadow: 2px 2px -1px black, 2px -2px -1px black, -2px 2px -1px black, -2px 
-2px -1px black;

While I feel that this is a step towards something we want in the spec, are we 
sure we want to define this this way? Under the current wording, a negative 
number would indicate a sharper-than-perfectly-sharp shadow, and that makes 
little sense. Plus, there is then no way to indicate a perfectly-sharp inner 
shadow. (Negative 0, anyone? Hey, where's everyone going? ^^;; )

Much as I hate to suggest adding another keyword for this, I agree that we 
probably need inner and outer here, but I'm not sure why you've suggested that 
syntax. I may be rusty on my CSS, but I don't think <length>(keyword) appears 
anywhere else. Hence:

box-shadow: none | <shadow> [inner | outer] [, <shadow> [inner | outer]]*
where <shadow> is: [<length> <length> <length>? || <color>]

I was (and still am) tempted to have '[inner | outer]' be optional and default 
of outer, due to the expectation for a shadow behind and outside the object, 
rather than on top of and within. Perhaps we need to (re)define shadow?

Eli Morris-Heft
dai@doublefishstudios.com

Received on Thursday, 8 May 2008 16:48:48 UTC