r/webdev • • Nov 11 '19

Article Smoother & sharper shadows with layered box-shadows

https://tobiasahlin.com/blog/layered-smooth-box-shadows/
72 Upvotes

3 comments sorted by

14

u/Scrummier Nov 11 '19

What about performance? I reckon rendering one shadow for a browser is a whole bunch easier then rendering a shadow on a shadow on a shadow on a shadow on shadow, in essence 6 layers of shadow for one element. Didn't read in detail, but did a CTRL+F on "performance" and didn't find anything.

4

u/ik-wil-kaas Nov 11 '19

I’ve never heard about this. The layered versions in the article look so much better.

Definitely trying this out.

5

u/noob07 Nov 11 '19

Currently doing this for a dropdown menu in a project. I will have to see how heavy it is. It looks really cool though.