Re: [css3-background] error in box-shadow examples?

On Jan 26, 2009, at 1:08 PM, Andrew Fedoniouk wrote:

> David Hyatt wrote:
>>
>> On Jan 26, 2009, at 12:44 PM, Andrew Fedoniouk wrote:
>>
>>> Algorithm is close to this:
>>>
>>> 1) Draw all elements that have no shadow set.
>>> 2) Draw shadow for elements with shadow on top of normal elements.
>>> 3) Draw shapes of shadowed elements (but not their shadow).
>>>
>>> By their nature elements with shadows have "z-index" higher than  
>>> other elements.
>>
>> I do not think this is a good idea.  What's in the spec is fine.
>> dave
>> (hyatt@apple.com)
>>
> I do not think that it is 'fine'. This spec is just silent about how  
> shadow is drawn
> with respect of sibling elements.

It's not silent.  The outer shadow draws just before the background  
and the inner shadow draws just after.   That's quite clear.

>
> E.g. if to follow implementation then shadow of some element will be  
> drown on top
> of its previous sibling but underneath its next sibling.
> That is quite naive, isn't it?

I don't believe it is.  box-shadow is just a decorative effect applied  
to the edge of a box.  I don't think it's any more or less special  
than say border-image.  If some box with a shadow is being animated on  
a page, I would not expect its shadows to be drawn behind the  
backgrounds of other elements that the box might be sliding over  
(which seems to be what you're implying should happen).

dave
(hyatt@apple.com)

Received on Monday, 26 January 2009 19:45:07 UTC