On Thu, Feb 12, 2009 at 12:11 PM, David Hyatt <hyatt@apple.com> wrote:
> My objection to building shadows into the border-image itself (and I say
> this knowing full well that we do this on OS X right now, e.g., iChat), is
> that the shadows then become part of the the object's border box.
> We have shadows built in to border images in iChat, and we have all this
> negative margin trickery to simulate the fact that the shadows should be
> pushed out beyond the border. It's gross.
>
Yeah, that's not ideal, but not uncommon. Putting a -5px margin on an
object's edge that has 5px of shadow is not difficult. It is mainly a
problem when you want to have it on a block that needs to have auto margins.
Of course, if we had something like 'block-align:center' (to simulate the
'align=center' attribute), then that would be covered too. And it doesn't
work on non-replaced inline elements or certain table display types, but
inline-blocks are fine. So that doesn't bother me that much.
I could also imagine a solution where we could say that border-width takes
up space (whether its suppressed or not), but image-border does not. So that
any difference between those two widths would not increase the size of the
border-box and how it affects layout.
> If the issue is having full control of what a shadow looks like, and being
> able to specify some kind of image for the shadow, then why don't we just
> extend box-shadow to support images?
>
Can you elaborate on that a little more? Maybe a rough example of how the
property values would be typed out? Keeping in mind that my objectives are
to have a fallback for when images and/or image-border is unavailable (a
"niche" that is probably bigger than Armenian numbering or selectors that
use Unicode edge-cases), while still having as much author control as
possible when they are available?