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

Re: Shadow knockout

From: Eric A. Meyer <eric@meyerweb.com>
Date: Wed, 26 Jan 2011 17:22:32 -0500
Message-Id: <a06230903c9664dd9a9d8@[]>
To: www-style@w3.org
At 9:20 AM -0800 1/26/11, Tab Atkins Jr. wrote:
>On Wed, Jan 26, 2011 at 5:00 AM, Rudolph Gottesheim
><r.gottesheim@loot.at> wrote:
>>  I'm missing a way to define if I want an element to knock out its own
>>  box-shadow. If I define { box-shadow: 10px 10px 10px #000; background-color:
>>  rgba(255, 0, 0, .5); }, I can't see the top left corner of the shadow.
>>  Maybe something like 'box-shadow-knockout: knockout' could work.
>I don't understand what you're trying to accomplish.  Could you supply
>a picture of what you want to happen?

    My guess is he's asking "if I define a semi-transparent or 
transparent background for an element with a drop shadow, why can't I 
see the part of the shadow that's 'behind' the element through the 
background, and is there a way to make it appear there?".
    'box-shadow' as written explicitly forbids any part of an outset 
shadow from appearing inside the border-box (the part of the shadow 
that would be "behind the element"), though it doesn't explain why.

Eric A. Meyer (eric@meyerweb.com)     http://meyerweb.com/
Received on Wednesday, 26 January 2011 22:23:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:42 UTC