W3C home > Mailing lists > Public > www-style@w3.org > December 2007

RE: [css3-background] CSS Drop Shadows

From: Alan Gresley <alan1@azzurum.com>
Date: Tue, 18 Dec 2007 08:48:43 -0700
To: fantasai <fantasai.lists@inkedblade.net>
cc: www-style@w3.org
Message-ID: <20071218084843.34b83c2f3c9bef00757a2c62c0fb7450.e2681b70f3.wbe@email.secureserver.net>

fantasai wrote:

> We could also just "shadow everything drawn in this element".
> This all sounds rather complicated to me so I want to step back and ask:
> 
> What do you, as a web designer, want to *do* with shadows? What's the end
> result you want to get?
> 
> [1] http://www.w3.org/TR/css3-background/
> [2] http://www.w3.org/TR/2005/WD-css3-background-20050216/
> [3] http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-box-shadow


I have no answers at this stage, I would like to make a suggestion though.... The part of the specs for box shadow or is that drop shadow that has this.

"Shadows do not influence the layout: they may overlap with other boxes. Like backgrounds and borders, if they overlap other boxes, they are drawn behind any text or replaced element."

The last part where it says

"if they overlap other boxes, they are drawn behind any text or replaced element."

This I believe should be 

"if they overlap other boxes, they are drawn behind any text or replaced element of any element that comes later in the source order."

Since this is what Safari already does and seeing the value in having both use cases of a shadow drawn behind text or replaced element or a shadow drawn in front of text or replaced element. I say the specs should be changed. I dare say it also easier to implement.

Here are two test cases using floated boxes showing a different stacking order between a drop shadow and overlapped box when the source order is reversed. Of course Safari 3 is needed to view the test cases.

http://css-class.com/test/css/drop-shadows/drop-shadow-br-source-order.htm

http://css-class.com/test/css/drop-shadows/drop-shadow-tl-source-order.htm

Alan

http://css-class.com/
Received on Tuesday, 18 December 2007 15:49:05 GMT

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