Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An I the only one upset this is done by (excessive) JS usage?

It would be my deepest displeasure to bring a button toggle animation to production that requires more than CSS.

Quick example I found:

https://hudecz.medium.com/how-to-create-a-pure-css-toggle-bu...

Easing/Smoothing is possible with transition-timing-function.

https://www.w3schools.com/cssref/css3_pr_transition-timing-f....



Buttons are just examples because it's easy to understand. The point of the article is the math.

Of course CSS could do it with less JS, but this would have been a totally different post.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: