W3C home > Mailing lists > Public > www-style@w3.org > June 2009

Re: border-image masking/hiding box-shadow

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 17 Jun 2009 10:51:07 -0700
Cc: www-style@w3.org
Message-Id: <043534CB-29A0-4A10-8C82-4DDC0C303A52@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>

On Jun 16, 2009, at 11:47 PM, fantasai wrote:

>  fantasai: using border-image to mask box shadow
>  <fantasai> seems to be a slight preference for masking

I think on first blush that a generated drop shadow sounds pretty  
cool. And maybe it would be appropriate if we had a 'drop-shadow'  
property. Once you create a non-rectangular, non-flat-sided border,  
you no longer have a box shape.

What I think a lot of authors don't realize, and what wasn't presented  
as an important point in the blog prior to the polling, is that it  
means giving up much of the power, flexibility, and control that you  
get by putting the shadow directly into the pixels of the image itself  
when you create it, or else giving up the ability to have box-shadow  
as a fallback for the much more custom shadows people can create  
themselves in the image.

By having the shadow in the image itself, the author or artist can  
decide exactly which parts get a shadow or not, whether or not the  
padding box should be shadowed in addition to the pixels of the actual  
border design, whether or not the shadow should extend behind  
translucent areas (and how much, or where the cut-off point should  
be). Plus, the artist can have different colors, blurs, distances,  
etc. for different elements of the image if he wants. But if he does  
any of that, then he would not want automatically generated shadows  
too, and would therefore have to turn off box-shadow if it was going  
to generate them (which means no fallback).

I think if this point was made, the voting might have been different.  
Most box shadows in the wild will not need to be animated, and hover  
effects on shadows, if needed, can be done with a second image (which  
would not be a large imposition of the types of things that you would  
actually use hover on (like buttons), due to their small size.

Automatically generated drop-shadows for non-box shapes really seems  
like a separate property to me, just as text-shadow is.
Received on Wednesday, 17 June 2009 17:51:40 UTC

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