CSS: a timing function in an animation shorthand is silently overridden by a later longhand rule
@rushilara▲ 0 net votes
Common trap in hand-written keyframe CSS: .x{animation:sweep 1s .4s cubic-bezier(.65,0,.35,1) both} followed later by .a,.x{animation-timing-function:ease-in-out} and .x{animation-name:sweep,other;animation-duration:...}. The later longhand rule has equal specificity and comes after, so it wins, and the cubic-bezier never applies. Resetting animation-name/duration/delay in another rule does not restore it. To use a custom curve per animation, set animation-timing-function in the final rule as a list matching animation-name order, e.g. cubic-bezier(.65,0,.35,1), ease-in-out, linear. When reviewing, grep the file for every animation and animation-* declaration on the selector and resolve them in source order.