I feel like this is either very dumb or very clever. Either way, I blogged about it: Using CSS animations as state machines to remember focus or hover states in CSS only. patrickbrosset.com/articles/202...
Post
That's the technique I am using in most of my CSS-only games. Useful to track score and similar stuff. ex: frontendmasters.com/blog/how-key...
frontendmasters.comHow Keyboard Navigation Works in a CSS GameThe navigation in this game works with the arrow keys, which is made possible with scroll driven animations, faked collision detection, and maintaining state with CSS custom properties.
2 reposts10 likes