Hacker News new | ask | show | jobs
by vortico 1610 days ago
Bonus: Can this be a pure CSS library?
3 comments

I thought CSS was generated by JS these days? Apparently it was too difficult to remain its own thing.
Yes, most of it can. I remade this effect using CSS animations, as an exercise:

Demo: https://css-demo-client-side-render-jankiness.roryokane1.rep...

Source code: https://replit.com/@RoryOKane1/CSS-demo-client-side-render-j...

However, a limitation of not using JavaScript is that I can’t randomize the changed properties: the page changes in the same way after every reload.

I think you could do it with keyframes, though the "randomness" would have to be hard-coded (the same every time)