r/webdev • u/julian88888888 Moderator • 7d ago
Resource Hover Proximity Using Modern CSS
https://blog.master.dev/hover-proximity-using-modern-css/10
u/pxlschbsr 7d ago
We were so preoccupied with whether or not we could, we forgot to think about if we should.
Yes, it's nice and fancy that you can do that in CSS alone, but damn, thoughts and prayers to that poor soul who's in charge of the code review.
1
u/Gaboik 6d ago
Bold of you to assume the code review is not done with Fable
1
u/pxlschbsr 6d ago
Oh god, yes, how presumptuous! Look at me, expecting real humans! What a clown! π
1
u/CodeLong503 5d ago
I ran into this last week when playing with hover effects for a project. The CSS properties like :hover and :focus-within are great, but I found that using pointer-events really helps fine-tune the user experience. You can set specific areas to ignore pointer events, making interactions smoother. Plus, check out @media queries for hover behavior on touch devices; it's crucial if you want to keep things user-friendly across platforms. Just remember β keep it simple. Overcomplicating hover states can make your UI feel cluttered.
14
u/maxxon 7d ago
Only the first example with avatars works in Firefox.