As documented we can define animation in CSS3 like
.class1{
animation: name duration timing-function delay iteration-count direction play-state
}
I want to know if I’ve given value for every attribute like name,duration,timing-function etc other than delay then how browser understand that I’ve skipped delay property.
then if I’ve given all the corresponding values for animation property then it is 1:1 matching to attributes and values but if want to skip any intermediate attribute for example
.class1 {
animation: anim 2s cubic-bezier(0 0 1 1) 2 alternate running
}
here I’ve skipped delay So how browser get to know that I’ve skipped delay attribute but not the others.
The official W3C draft is very sketchy and you will not get a good “official” answer. Basically the browser tries to parse each value according to the specification order, skipping those subproperties that do not match the corresponding value in the
animationproperty; so it first sees that the first value is a validanimation-name, then the second is a validanimation-duration, and goes on until it reaches the value2, which is not a valid value foranimation-delay, so it skipsanimation-delayand checks to see if it is a validanimation-iteration-count, which it is.