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

Re: [css3-background] box-shadow syntax

From: Alan Gresley <alan@css-class.com>
Date: Sat, 10 May 2008 09:41:30 +1000
Message-ID: <4824E12A.7060905@css-class.com>
To: Eli Morris-Heft <dai@doublefishstudios.com>
CC: Brad Kemper <brkemper@comcast.net>, "www-style@w3.org list" <www-style@w3.org>

Eli Morris-Heft wrote:
> I apologize in advance for the length here. I'm feeling verbose today. ^^


More verbose the better.


> Alan Gresley wrote:
>> Ok, the default could be.
>>
>> 4px
>>
>> and optional keywords (in brackets)
>>
>> 4px(even) -  no graduation.
>> 4px(inner)
>> 4px(electric)
>> 4px(ghostly)
>> 4px(foggy)
>> 4px(cloudy)
> 
> Whoa, there. If I may be so bold, I think this is the *wrong* way to 
> approach this. This is an entirely new sort of format to be using for 
> values of CSS properties, and I'm not sure it buys us anything over just 
> using keywords. Plus, there're already kinds of values that use 
> parentheses, and they generally indicate functions, and don't have names 
> that change: rgba(), url(), hsla(), etc. Making UAs parse for these when 
> you could have 4px(), -3px(), 1em(), 0.5in(), 18cm(), etc., is a nightmare.


I suggesting parentheses on the third value. Not all three values (or 
four as I see above).


> Setting aside that "inner" wouldn't control the same kind of thing 
> "cloudy" might, and that I don't know how I'd draw an "electric" shadow, 
> I think that (a) UAs would have a heck of a time trying to figure out 
> what to do with this, (b) it would make UA implementations vastly 
> different and unpredictable, and (c) as a developer, I happen to think 
> this is a pretty confusing syntax.


box-shadow: 4px -3px 1em() blue;


Does that look confusing to you?


> Having two lengths for positioning, a possible length indicating the 
> extent of the blur on the shadow (which, keep in mind, doesn't extend 
> the shadow any; it just makes the outer edges and portions more blurry), 
> a possible color, and an indication as to whether it's an outer or inner 
> shadow is perfectly fine for here, I think.
> 
> Eli Morris-Heft
> dai@doublefishstudios.com


This also cover box-shadow. Why can't the shadow appear smaller or 
larger then the box that is casting the shadow (which would suggest 
depth of field -one point perspective-). Remember that a box-shadow is 
seen underneath the box if the box is transparent. Maybe what I should 
have put is.


box-shadow: 4px -3px inner(foggy) blue;
box-shadow: 4px -3px outer(5) blue;
box-shadow: 4px -3px even(50%) blue;


For simple understandability for authors. What applies for text-shadow 
must I believe relate to box-shadow.

We are brainstorming here, not 'casting' any thing in cement.


Alan
Received on Friday, 9 May 2008 23:42:17 GMT

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