I often find myself adding transitions to a lot of things, and often they are the same transition. What would be the performance cost of just doing something like
* {
transition: all 200ms ease; //with prefixes, of course
}
and just setting a transition-property: none;
to elements you specifically didn't want transitioning? Would it be less than the amount of code required to add multiple transition statements throughout your code?
EDIT: For those wondering about the complexity of the DOM this applied to, assume it is a complex web-app-type DOM. The reason I ask is because many elements on the page don't move and thus don't require the transition. I am curious as to whether or not that is relevant and merely assigning transitions to all elements is detrimental to performance.
When they are not transitioning they are not consuming extra resources, so after rendering it's the same, assuming you have removed all the unnecessary transitions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With