Re: [css3-background] box-shadow syntax

Eli Morris-Heft wrote:
> 
> Brad Kemper wrote:
>  > But it is possible that implementors (or others) might prefer a separate
>  > keyword ("inner" | "outer") in addition to the slots for horizontal
>  > offset, vertical offset, and blur. That was Eli's idea, Alan. I'm OK
>  > with that too. It would be easy to understand and easily parsed . I
>  > still like the elegance and brevity of my separate idea of just adding a
>  > minus sign to indicate that the shadow is on the negative space instead
>  > of the positive. I think "negative space" is a concept most designers
>  > are familiar with. And that whole range of negative numbers is just
>  > going to waste on blur anyway, which is the whole reason I would use the
>  > minus sign there (the offsets already allow negative number 
> measurements).
> 
> This much I agree with. But I still think that the fact that there's no 
> way to
> indicate a sharp inner shadow is a real impediment. A value of '-0', while
> aesthetically consistent, really rubs me the wrong way. Any intuition 
> gained by
> using negative numbers is more than outweighed by the discomfort caused by
> having to use '-0'. Plus, it would render parseInt functions and the like
> unable to distinguish.


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.

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.


>  > I agree with all that. I would also add a desire for an optional
>  > "spread" value, which would thicken the shadow without making it more
>  > blurry. The term "spread" is used in Photoshop, and it is similar to
>  > drawing a same-color stroke of the specified thickness around the shadow
>  > prior to blurring it. It is very useful, especially for shadows on small
>  > elements (or text) where you want to see a little more of the shadow
>  > without offsetting it more or blurring the heck out of it.
> 
> And it makes a much easier way to turn a shadow into a glow 
> (text-shadow: 0px 0px 0px 4px blue), and add a bit of perspective. I 
> like it. I hope the implementors do too.... I propose that it goes after 
> the blur radius:


I see you have.

0px 0px 0px 4px blue

What does the third value do? Perspective is already handled by the 
first two position values. The box or text casting the shadow would have 
to show angles of corners other than 90 degrees for perspective to be 
seen. You can not show perspective by a shadow alone remembering a 
shadow is only cast since there is a presume light source.


> ...assuming everyone else likes this idea too. I do get the slight 
> sensation of feature creep, though, so maybe we should stop here before 
> loading too many bells and whistles onto this gong?


Are we talking about CSS3 or CSS4. What we were initially talking about 
is glow, blur or inner. We still have know way to control what type of 
blur it is. Is it a motion blur, gaussian blur. That why I mentioned 
keywords in brackets. None of the may ever materialize but if the syntax 
is committed to now it must serve for all future CSS development.

One instance of this is with margins, padding and border-width which 
does not correspond with background position. That was a decision made 
in the late 1990's that will forever live in CSS.


Alan

Received on Friday, 9 May 2008 23:19:23 UTC