Reactive Animations with CSS Variables
summary
Shows how CSS variables and RxJS combine to push event streams into style values: using event observables, element.style.setProperty, and a tiny glue library RX CSS (about 1.56 KB on npm) to drive animations. Live demos include mouse, scroll and touch pan mapped to CSS, claims of smooth 60 FPS with far fewer DOM writes, reuse across CSS/Canvas/WebGL, and progressive enhancement where IE/Edge fallback remains necessary.
AI-written summary · about
chapters (7)
- 0:00Start
- 17:36CSS VARIABLES RXJS OBSERVABLES
- 22:07THINK OF RXJS AS LODASH FOR OBSERVABLES
- 23:38ARE YOU THINKING WHAT I'M THINKING?
- 23:52WHAT IF WE MODELED OBSERVABLE EVENTS AS CSS VARIABLES?
- 24:03WHAT IF WE COULD WRITE JAVASCRIPT IN CSS?
- 28:45WHY USE CSS VARIABLES?








