Please consider the UX of your state toggles. The red/green states will be difficult for color-blind users to discern and, color aside, it's tough to tell which is the active state.
I hear you. But, isn't this just an editor's draft spec? Only Chrome and Android have done any implementation at all. So, as far as I can tell, there's a chance this will never be fully implemented? And, because it's a draft, the spec could change significantly. Is that right?
Hey, author here. I'm very open to ideas to reduce bloat. It's 140 SLOC and ~1.1kb gzipped without lodash/throttle. I considered writing my own throttle, but wanted something more battle-tested.
Does Rollup produce a more efficient bundle in your experience?
Any time you're performing an operation on a scroll event, that is a risk. But this uses a single "scroll" event listener throttled to fire a maximum of every 100ms.
I just finished writing this little side project. It was inspired by the effect on http://oak.is. I'd love to get feedback in the form of issues & pull requests.
This is the first library I've written completely in ES6, which was a pleasure. I hope you enjoy it!