W3C home > Mailing lists > Public > www-style@w3.org > January 2009

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

From: David Hyatt <hyatt@apple.com>
Date: Mon, 26 Jan 2009 13:44:25 -0600
Cc: Håkon Wium Lie <howcome@opera.com>, Brad Kemper <brad.kemper@gmail.com>, www-style@w3.org
Message-id: <CE992229-10ED-468E-B86E-F136E66D805D@apple.com>
To: Andrew Fedoniouk <news@terrainformatica.com>

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).

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:24 UTC