- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Thu, 12 Feb 2009 11:43:20 -0800
- To: David Hyatt <hyatt@apple.com>
- Cc: robert@ocallahan.org, fantasai <fantasai.lists@inkedblade.net>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
- Message-ID: <7e1f93760902121143q4745dfd6v9bcf08e9cf8d1be8@mail.gmail.com>
On Thu, Feb 12, 2009 at 9:54 AM, David Hyatt <hyatt@apple.com> wrote: > > Rather than suppressing the shadow, what about using the border-image as a > mask when deciding how to draw the shadow? In theory it should be possible > to intelligently draw a more complex shadow for a border-image object. > > dave > This would be my second choice, if a compromise is really needed. Why? Because it creates new questions about the author's intent that could otherwise be dealt with directly by the author when he crafts the shadows himself in an image editor. So, if you generated dynamically generated the shadow based on the image, in order to have a viable fallback, then you have these issues: 1. How to deal with soft image edges, where there is variable opacity? Currently, WebKit seems to clip shadows to the vector edge of the border box, and not draw them behind areas of variable opacity (such as backgrounds). It seems like for a raster image that was 50% opaque, it would have draw the shadow behind the whole image at 50% of its normal opacity. Or do you set some sort of threshold on images of varying opacity, and just draw a hard inner edge at 50% and not draw shadows for any pixels more transparent than that? Any of those choices may or may not be what the author wants. Setting the shadow in the image himself provides more options. 2. If I am crafting the image and shadows myself, I can create parts of the image that glow like lights and don't cast any shadow, and other parts that do cast a shadow. Dynamically generated images don't give me that option. 3. Currently, box-shadows without the 'inset' keyword do not cast shadows upon the padding box. Would this still be the case when an image abutted the padding box? For consistency, I would say it shouldn't, and for many designs I would not want it to, but it's a question to be answered, and may complicate the implementation. By the way, I am more ambivelant about how inset shadows should work in regard to image-shadow. They are much less an edge/border effect, and more of padding-box effect against the background. Putting an inset shadow on a complex border is much different than putting an inset shadow on a padding box. I am inclined to think that inset shadows should not be supressed and should not be dynamically drawn inside the images of the image-border.
Received on Thursday, 12 February 2009 19:43:55 UTC