W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: Implementation of Inset Box Shadow on image elements

From: Simon Fraser <smfr@me.com>
Date: Tue, 03 Aug 2010 10:54:48 -0700
Cc: fantasai <fantasai.lists@inkedblade.net>, Brian Manthos <brianman@microsoft.com>, divya manian <divya.manian@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-id: <30983E26-10EC-44B5-A3DC-573515336A4E@me.com>
To: Brad Kemper <brad.kemper@gmail.com>
On Jul 27, 2010, at 2:54 PM, Brad Kemper wrote:

> On Jul 27, 2010, at 2:10 PM, Simon Fraser <smfr@me.com> wrote:
> 
>> z-index only applies to positioned elements, so the author will have to
>> apply both position: and z-index: to pop children above the inset shadow.
>> That's unfortunate. It also means that a z-index: 0 child that projects outside
>> the shadowed box's bounds will get the shadow rendered over part of it, which is
>> weird, unless you also require overflow:hidden here.
>> Testcase at <http://smfr.org/misc/inset-shadow.html>.
>> 
>> Also, a common use of inset shadows is as an alternative border around
>> <div>s containing text. It seems wrong for the shadow to cause the text
>> to "dim out" without further author tweaking
> 
> Right. I really come down to, if you think of inner shadows as simulating an element shaped hole being cut out of the canvas (and whatever else is behind the canvas), then should the content be at the level of the canvas with the hole behind it, or should it be on that background surface behind the hole. I've always preferred the former, given that I want my text to be readable (consider white text against a darkish background with a black shadow, for example), and given that child element can extend outside the box, and with 'overflow: visible' the illusion that the element was behind the hole would not hold up. 
> 
> So perhaps for non-visible overflow the shadow could go in front of the children. That might be kind of cool, but still isn't what I really want for scrollable text boxes with inner shadows. 

So one thing I don't understand about this proposed use of inset shadow, illustrated at
<http://dl.dropbox.com/u/952/pola/index.html>, is why the background-image is dimmed out at all.

The inset shadow goes from fully opaque at the edges of the "hole", to fully transparent over most
of the hole (by some distance related to the blur radius from the edge). So, outside the influence
of the shadow, the background-image should be fully revealed. Why is it dimmed out?

Simon
Received on Tuesday, 3 August 2010 17:55:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT