Live data from Hacker News

Better Box Shadows (CSS)

uglyduck.ca

1–10 of 60 posts

Re: Better Box Shadows (CSS)

#4
Pure CSS box shadows without extra markup can be achieved with using negative spread (with increased blur to compensate) and multiple shadows. I believe it allows to achieve the exact look the author demonstrates at the end.

What I'd like to see is browser engines converge on identical box shadow rendering. Currently shadows tend to be more pronounced in Firefox relative to WebKit.

Re: Better Box Shadows (CSS)

#6
post #4

Pure CSS box shadows without extra markup can be achieved with using negative spread (with increased blur to compensate) and multiple shadows. I believe it allows to achieve the exact look the author demonstrates at the end. What I'd like to see is browser engines converge on identical box shadow rendering. Currently shadows tend to be more pronounced in Firefox relative to WebKit.

What I would prefer to see is user settings for box shadow rendering, so that the user can configure how much pronounced it is or to disable it entirely, with presets for imitating Firefox and for imitating WebKit.

Re: Better Box Shadows (CSS)

#10
Maybe I'm missing some detail, but the blur filter seems pointless. Both box-shadow and blur() are approximations of gaussian blurs.

If you apply two gaussian blurs, you're multiplying two gaussian functions in the frequency domain. The product of two gaussian functions is another gaussian function, so the same effect can be accomplished more efficiently with a single gaussian blur. You just need to tweak the shadow opacity and blur radius.

Post reply on HN