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

Re: [CSSWG] Minutes and Resolutions 2009-02-04: box-shadow and border-image

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 17 Feb 2009 20:31:41 -0800
Cc: David Hyatt <hyatt@apple.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org W3C" <www-style@w3.org>
Message-Id: <55762EFD-98D2-4C1E-A313-6F927915273B@gmail.com>
To: "robert@ocallahan.org O'Callahan" <robert@ocallahan.org>, fantasai <fantasai.lists@inkedblade.net>

On Feb 17, 2009, at 7:23 PM, Robert O'Callahan wrote:

> True. So about that kettle of fish. What should 'inset' do, that would
> be both useful and unsurprising? The same thing? Just drop-shadow the
> border-image?
> Yes, I think so. To use it, you'd make the border-image opaque on  
> the outside and transparent on the inside. You can't then  
> effectively have an outside shadow and an inside shadow, but too bad.

If I understand you correctly, then I disagree. The image-border is a  
replacement mostly for the border properties. Making the opaque parts  
of the bitmap images into cutouts would be analogous to making the  
traditional border into a cutout. So if you had a 10px solid border,  
it would be like a laser had cut a 10px channel around the outside of  
the padding box. But that is not what the 'inset' part of box-shadow  

  # An inner box-shadow casts a shadow as if everything outside the
  # padding edge were opaque ... shadows the canvas onto the box,
  # as if the box were cut out of the canvas and shifted behind it

Since image-borders are mostly replacements for normal borders, and  
since box-shadow is something that looks as if the border-box or  
border is casting a shadow, it makes sense that (if box-shadow is  
going to be generated) it would be as if the images of the image- 
border were casting the shadow. But inset shadows are not shadows of  
the border. They are shadows of "everything outside the padding edge",  
shadows of "the canvas onto the [padding-] box, as if the box were cut  
out of the canvas and shifted behind it". Note that borders are not  
even mentioned in the definition of inner box shadow. To shift that  
shadow to the inside of the border images would be something else  
entirely. I would find it surprising—and not as useful—to have  
something which previously made the background into a plane behind a  
padding edge cut-out of the canvas plane was now causing the border to  
be cut out of the canvas plane instead.

On Feb 17, 2009, at 12:56 PM, fantasai wrote:
>> My view, as stated before, is that "inset" shadows should have  
>> nothing to do with image-border. They are a decorative effect on  
>> the padding box.
>> Imagine a box with a thick border and a thick inset shadow. It  
>> looks a little like a frame casting a shadow through a cut out  
>> space onto a surface below. Now replace the border with an image of  
>> a straight-edged picture frame that followed the same edges.  
>> Wouldn't you still expect the cut-out effect of the padding box to  
>> be the same? If you you inset the image of the border, you end up  
>> with a completely different area being cut out (unlike with outer  
>> shadows).
> The same thing is true of outer shadows. Look at the diamond border in

Not in the same way. Sure, the shape changes because the border is a  
different shape. But with outside shadows it is the border edge that  
casts the shadow onto the canvas. With inner shadows, it is the  
background of the element that has the shadow cast onto it, from a  
hole that follows the shape of the padding box. The border itself has  
no visible effect on inner shadows.

The main relevance of the border on inner shadows is that when it is  
invisible, as border-image can make it, there is less of an effect  
that the background is showing because of a hole in the canvas, unless  
the the shadow edge and the background-clip edge happen to be the  
same. I suppose that would also be true when the border is not solid  
and not none too, since background would show through the spaces  
between dashes/dots/etc. Another kettle of fish there, perhaps. But as  
long as the shadow at the padding edge continued back to the border- 
box edge with the same shade, it should still look pretty decent (sort  
of a cheap border-width spread effect on inner shadows).
Received on Wednesday, 18 February 2009 04:32:22 UTC

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