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:50:03 +1100
Message-ID: <CAERAJ+9PUVceSv1+==SbshqM1Jvy8yG9MJhbiHLx1TSfd2av2g@mail.gmail.com>
To: François REMY <francois.remy.dev@outlook.com>, W3C CSS Mailing List <www-style@w3.org>
This is only part of the problem. In short:

- The designs I receive, have vertical and linear shadows, inside or
outside of elements.
- Sometimes they belong to an element that show drop a shadow over multiple
other elements.
- As far as I can see, neither one of box shadow and linear gradient are
flexible enough to handle all the different cases.
- Thus I have to use both.
- And the question is: is there a formula for creating a box shadow that
renders identical to a given linear gradient?

Behrang Saeedzadeh

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

> > Hi François (is it pronounced frans-va? :))
> Alright
> > 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.
> Couldn't you use a single-color box-shadow?
Received on Wednesday, 30 January 2013 23:50:34 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:23 UTC