|
|
|
|
|
by MostExtremeCake
5513 days ago
|
|
It's mostly a cruft/style issue. Some people prefer to have as much of their style-related code in pure css as possible. People having javascript off is not really a concern anymore as long as you're providing them with a baseline experience. For more complicated animation, css can perform better than javascript because the browser is allowed to optimize css animation as it sees fit. For example: a browser will stop trying to figure out the position of an element animated using css when you switch to a different tab. It will then "catch up" when you switch back. With javascript, it does not have that option an will continue to animate all elements even when you can't actually see the tab. This can eat into battery life. |
|