Re: suggestion of adding top,right,bottom,right to box-shadow

On Sep 14, 2011, at 7:31 AM, Alan Gresley wrote:

> On 14/09/2011 11:18 PM, Brad Kemper wrote:
>> 
>> The way you describe hiding parts of the shadow by specifying them
>> per-edge sounds awkward and unnatural. The UA would have to be able
>> to have separate offsets and blurs and spreads and colors for each
>> side, somehow joined at the corners. But based on your use case,
>> really all you need is a way to crop the shadow. Using
>> overflow:hidden is not that hacky a way to do it, and much more
>> natural than your idea.
> 
> 
> I'm not sure what Shi really wants.
> 
> Maybe a mock up graphic may help us know what you are seeking.

My understanding was based on following Shi's link [1], which leads to a page [2] that has a link to the site, where there is a navigation strip in which the shadow seems to be laying with the other elements in an undesirable way. So it looks like either cropping the shadow or having a way to send it to a different z-index (outside the element's context) would be the most direct way to solve the problem.


> The way you described the corner joins in a way that is not how box-shadow currently works makes me wonder if this can not be done another way.
> 
> The below demo may be more the rendering you are wanting.
> 
> http://css-class.com/test/css/3/gradients/drop-shadows.htm

I don't think so. You can do that sort of thing more easily by using a negative spread on an inset shadow.

1) http://stackoverflow.com/questions/4909561/css3-box-shadow-on-top-left-and-right-only
2 http://innovideoproductions.com/

Received on Wednesday, 14 September 2011 15:27:46 UTC