DEV Community

Discussion on: I'm Chris Coyier from CodePen, CSS-Tricks, and ShopTalk Show. Ask Me Anything!

Collapse
 
chriscoyier profile image
Chris Coyier

I think "scroll shadows" in CSS is one of my favorite CSS tricks of all times. Originally by Roman Komarov, explained and improved by Lea Verou. I saw a tool the other day around the idea by Stefan Judis.

It's a real mind-bender involving four layered gradient backgrounds, each positioned, sized, and colored differently, and then behavioraly different regarding scrolling.

It's not just a neat trick, it has real UX implications. Showing a shadow of where you can scroll is important UX. Consider this story of a recent design update in iOS that led to complete confusion UI actions hidden behind a place you could scroll to, but had zero affordence on how to get there. (Happens to me all the time in Spotify, for the record.)

Collapse
 
nickytonline profile image
Nick Taylor

Awesome sauce. Thanks for sharing Chris!

Some comments have been hidden by the post's author - find out more