Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries
Oh, how I have been waiting to write this title! If you've read a few things by me, you know I'm always a bit hyped when CSS gives us the keys to the state-machine kingdom. For years, we've relied on intersection observers or scroll events in JavaScript to answer simple questions about an element's position and state. We already have a lot of these things happening in browsers, such as scroll-driven animations. But more state information is on the rise with an update on scroll-state queries.
Read moreabout Is it scrolled? Is it not? Let's find out with CSS @container scroll-state() queries