RE: [css3-background] CSS Drop Shadows

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 UTC