If a designer is using a fancy css animation and hopes to have functionality in older and newer browsers, we usually create a @keyframes and a @-webkit-keyframes section. Most of the examples I have seen use both non-prefixed and browser prefixed css under both keyframes, but is this necessary.
@keyframes coolEffect {
-webkit-transform: some value;
transform: some value;
-webkit-animation-timing-function: some value;
animation-timing-function: some value;
}
@-webkit-keyframes coolEffect {
-webkit-transform: some value;
transform: some value;
-webkit-animation-timing-function: some value;
animation-timing-function: some value;
}
Do we need non-prefixed values in the @-webkit-keyframes, since a browser using that would also use -webkit- prefixed css? And likewise since we are using @-webkit-keyframes, do we need to include -webkit- prefixed css in the main @keyframes? Would a simpler smaller version work equally as well?
@keyframes coolEffect {
transform: some value;
animation-timing-function: some value;
}
@-webkit-keyframes coolEffect {
-webkit-transform: some value;
-webkit-animation-timing-function: some value;
}
To clarify, I am not asking about what would work for my particular website, I am asking about functionality and whether or not code sample two would work the same as code sample one.
Thanks.