One of the best-known examples of CSS state management is the checkbox hack. What if we want a component to be in one of three, four, or seven modes? That is where the Radio State Machine comes in.
CSS now does what Floating UI, GSAP ScrollTrigger, Framer Motion, and react-select used to require JavaScript for. Here is exactly how much that saves, why these libraries were painful beyond their size, and what the platform still hasn't figured out.
Patrick - Using CSS animations as state machines to remember focus and hover states with CSS only
I discovered this CSS-only trick to store the past code:focus/code or code:hover/code state of any element. Without JavaScript, you can style elements depending on whether they were ever focused or hovered. Here's how it works.
In game development, it’s common to use spritesheets for animation, but this technique isn’t as widely used on the web. Which is a shame, because we can do some pretty cool stuff with sprites! In this post, we’ll share the niche CSS function you can use to leverage this technique, and explore some of the potential use cases.
Expand the clickable area of a button without changing its UI - Dev Recipes
Ever struggled to tap a tiny button on your phone? Let me show you a simple CSS technique to increase the clickable area without altering the button's visual appearance.