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: Sun, 11 May 2008 13:31:29 +1000
Message-ID: <48266891.5000403@css-class.com>
To: Henrik Hansen <henrikb4@gmail.com>
CC: www-style@w3.org

Henrik Hansen wrote:

CC to www.style

> I've made a diagram that explains my impression of how box-shadow should
> work.
> 
> http://img440.imageshack.us/img440/5240/shadowdiagramfqh7.png
> 
> The first box (top-left) is a red box with a shadow. The shadow is black and
> semi-transparent. Now on the second box (mid-left) is a semi-transparent red
> box with a shadow, the box is slightly red and is more transparent than the
> first. This is because the "light" is transmitted through the box, thus
> making the shadow red and less transparent.'
> 
> The box on the mid-right has no transmittance and is therefore black, and
> normally transparent.
> 
> A last thing is the mask setting: if its true: the shadow can't be seen
> through the box itself.
> 
> Just my thought on how this should work. But of course this is maybe not
> they most useful set features, I could see some use of it: If you f.x. had a
> .png image with some transparent parts and some solid parts, then you could
> make shadows automatically in the UA. That is not possible if the shadow
> can't be seen through a semi-/transparent object.
> 
> -Henrik


Precisely

A glass top outdoor table will cast a shadow since the glass is 
reflecting some of the light upwards but at the same time you can view 
this shadow cast by the glass through the glass top table itself. Shadow 
naturally can be seen through transparent surfaces such as a transparent 
background. This is seen to the two examples on the second row in your 
screenshot Henrik.

I do remember David Hyatt mentioning in Jan~Feb how shadows can be 
painted. There was two ways of doing it. One was easier. Now I can't 
find the link.


Alan
Received on Sunday, 11 May 2008 03:32:19 GMT

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