When setting transition-property to all, it looks bad when zooming inside the browser window, because width and height properties are also being transitioned. When I only want background and color, I need to define it multi line, though:
transition-property: color, background;
transition-duration: 250ms;
This is bad, because I also have to do it for -webkit-, -moz and -o-. Instead I’m looking for something like this:
transition: [color and background] 250ms;
Is there any syntax for this?
When using the
transitionshorthand with multiple transitions, you need to repeat the transition duration for each property, and separate each group of values with commas:With prefixes, it looks like this:
Still a little repetitive, but at least it beats repeating
transition-propertyandtransition-durationfor all the prefixes.The shorthand syntax is described in the spec.