W3C home > Mailing lists > Public > www-style@w3.org > September 2011

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

From: Mark Kenny <beingmrkenny@gmail.com>
Date: Wed, 14 Sep 2011 16:40:39 +0100
Message-ID: <CAEep_bfvy3waOhCC5u3sjq6mUa=NMZn2VgUfRpi2rDMf6ZHgLg@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Alan Gresley <alan@css-class.com>, shi chuan <shichuanr@gmail.com>, Simon Fraser <smfr@me.com>, "www-style@w3.org" <www-style@w3.org>
I sent this from my other email, so apologies since it will come through
twice.

I think a better native solution would be to specify the shape of the
shadow, for example:

box-shadow-transform: height% width%;

Where height% and width% were percentages of the box dimensions. Obviously
other values could be used: absolute lengths, expressions such as original -
x pixels etc.

Mark

--
Mark Kenny
beingmrkenny.co.uk
@beingmrkenny



On 14 September 2011 16:27, Brad Kemper <brad.kemper@gmail.com> wrote:

>
> 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:41:30 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:44 GMT