Re: Non-hacky support for top-and-bottom-only (or left-and-right-only, etc.) drop shadows

Hi all,

Please see this thread on why box-shadow-[top, right, bottom, left] are
necessary: http://lists.w3.org/Archives/Public/www-style/2013Jan/0600.html

As you can see not all drop shadows can be converted to identical
linear-gradients.

Cheers,
Behrang Saeedzadeh
http://www.behrang.org


On Wed, Dec 5, 2012 at 5:47 AM, Brad Kemper <brad.kemper@gmail.com> wrote:

> On Dec 2, 2012, at 4:31 PM, Behrang Saeedzadeh <behrangsa@gmail.com>
> wrote:
>
> Hi,
>
> Right now box-shadow's syntax does not provide a way for specifying
> shadows only for top and bottom of an element. The only way of achieving
> this is using some clever hacks like the one here:
> http://stackoverflow.com/a/10150898/1736621
>
> This in turn leads to drop shadows that are brighter than what is expected.
>
> I think apart from box-shadow, we also need box-shadow-top,
> box-shadow-right, box-shadow-bottom, and box-shadow-left.
>
> What do you think?
>
> Please see the attached example.
>
>  Selection_012.png<https://docs.google.com/file/d/0ByWstmU-AS9GNURTUkVMdWdWdzQ/edit>
>
>
> Cheers,
> Behrang Saeedzadeh
> http://www.behrang.org
>
>
> It looks more like a gradient background to me than a box shadow. Since
> inner box shadows are right above the background layers anyway, why not
> just use a linear gradient as your top-most background layer, rather than
> trying to hack box-shadow to create a similar effect?
>

Received on Monday, 4 February 2013 23:13:57 UTC