So I'm trying to do something functionally equivalent to this:
Can a sass @mixin accept an undefined number of arguments?
...with a transitionFast
mixin, but I want to be strict about the easing functions and speeds, so I've defined them within the mixin, like so:
@mixin transitionFast($property) {
-webkit-transition:$property ease 0.2s;
-moz-transition:$property ease 0.2s;
-o-transition:$property ease 0.2s;
transition:$property ease 0.2s;
}
How can I pass multiple $properties
to this, without passing through the ease 0.2s
part? I've tried this:
@mixin transitionFast($properties...) {
@each $property in $properties {
transition:$property ease 0.5s;
}
}
which I'm trying to call like this:
@include transitionFast(background-color, color);
but it doesn't work and only applies the transition to the last passed argument. Any ideas?