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

Another idea (you have some default transitions in there already, but I like this one):

  * {
    transition: all 0.2s ease-out;
  }
It's bold, but quite effective. Suddenly literally every property change looks natural.


It's a pain on the CPU though if you have a lot of non-transform/opacity changes though. It's much better to just animate the elements that you want animated and leave the rest alone.


I hadn't considered that, although it shouldn't create waste, right? Presumably, unchanging properties with transitions enabled don't add any work to be done. If it's only the ones that change, and if I really do want all of those to transition, there's no problem.


Right, but a lot of properties you probably don't want animated, and modern frameworks also reuse dom elements sometimes, so it might create a lot of lag and weird transitions between elements that you didn't foresee.




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

Search: