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

On Wed, Sep 14, 2011 at 7:31 AM, Alan Gresley <alan@css-class.com> 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. 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

<http://blog.w3conversions.com/2011/09/css3-spread-value-and-box-shadow-on-one-side-only/>
is a blog post showing one method to achieve a shadow on only one side
of an element.  This only has minimal reasoning as to *why* you'd want
it, but one possible explanation is to achieve more of a "lifted"
look, where the shadow is smaller than the box.

I think this is already well-achieved by having a negative spread
radius (method 2 in the linked blog post).  Unless there's a good
reason why this won't work, I don't think it's necessary to add
anything to box-shadow.

~TJ

Received on Wednesday, 14 September 2011 15:18:15 UTC