W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Re: Is there a formula for converting a linear gradient to a box-shadow?

From: Behrang Saeedzadeh <behrangsa@gmail.com>
Date: Thu, 31 Jan 2013 10:12:59 +1100
Message-ID: <CAERAJ+9t27y4_k44fi0L6-dMHQ5VU=3tsTswF5+QQhcBN7zFiA@mail.gmail.com>
To: François REMY <francois.remy.dev@outlook.com>, W3C CSS Mailing List <www-style@w3.org>
Hi François (is it pronounced frans-va? :))

This is the kind of thing I want to use the drop shadow for:
https://docs.google.com/file/d/0ByWstmU-AS9GdlZVTjdyemFQRGM/edit

I have this page-wide nav-bar that should drop a shadow over everything
underneath it. As far as I can see, this can't be done elegantly with
linear-gradients, although I think it might be possible with an :after
element.

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


On Thu, Jan 31, 2013 at 10:02 AM, François REMY <
francois.remy.dev@outlook.com> wrote:

>  Using box-shadows to render a linear gradient is not a very good idea
> from a performance point of view. I’ve no code to share with you but an
> advice to avoid doing this. What’s your use case?
>
>
>
>
>  *De :* Behrang Saeedzadeh
> *Envoyé :* 30 janvier 2013 23:55
> *À :* W3C CSS Mailing List
> *Objet :* Is there a formula for converting a linear gradient to a
> box-shadow?
>
> Hi,
>
> I want to define a box-shadow that renders something identical to a linear
> gradient. But box-shadow and linear gradient have different parameters.
>
> The question is, is there a formula for converting a linear gradient to a
> box shadow?
>
> Cheers,
> Behrang Saeedzadeh
> http://www.behrang.org
>
Received on Wednesday, 30 January 2013 23:13:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT