I often find that I add transitions to many things, and often they are one and the same transition. What would the execution cost be just something like
* {
transition: all 200ms ease; //with prefixes, of course
}
and just set transition-property: none;for items that you specifically didn’t want to go over? Would it be less than the amount of code needed to add multiple branch statements to all of your code?
EDIT: For those interested in the DOM complexity to which this applies, suppose this is a complex DOM type for web applications. The reason I am asking for is because many of the elements on the page do not move and therefore do not require a transition. I am curious if this is really relevant and just assign transitions to all elements, this is bad for performance.
source
share