by diggan · 1y ago · 0 comments
I'm guessing most of that code is used for other things on the website/landing page (SPA without bundle splitting per page), and the same stuff is loaded for every page, since the code for building that would be trivial compared to the multiple large bundles like they're shipping right now.
Which kind of makes me think, what is the smallest amount of JS one could write to 100% replicate this page? Would <1KB be enough? Bonus points if it could be implemented with CSS only, under 1KB.
Wow, that phrase triggered a tune burried deep in my brain I hadn’t heard in 20 years.
Brains are weird
And what part uses the visibility state? The grayscale seems to be triggered by focus which I think would be doable with CSS
At a glance I'm not sure exactly how I'd implement it, but my guess is that it's possible with some workarounds and hacks, at the very least.
Here's an article showing some demos (at the bottom) on how you can make the mouse cursor affect CSS: https://css-tricks.com/how-to-map-mouse-position-in-css/