Comment

Comment by cmgriffing

I recently discovered the way Tanstack does this. Basically, if the heading of the section is in the viewport, then the list item is highlighted.

So you could have multiple items highlighted, but it still "works" somewhat intuitively for the end user.

The drawback is that it requires JS via intersection observer. But maybe the CSS standards committee could see value in this kind of thing eventually.

parent cmgriffing 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton