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

Re: Implementation of Inset Box Shadow on image elements

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 27 Jul 2010 14:54:00 -0700
Message-Id: <B151243A-E952-4B26-BFAD-50BE14227DBE@gmail.com>
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>
To: Simon Fraser <smfr@me.com>
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. 
Received on Tuesday, 27 July 2010 21:55:18 GMT

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