Pass value that are comma-separated into a mixin with an variable argument

@mixin transition($val...) {
	-webkit-transition: $val;
  	-moz-transition: $val;
  	transition: $val;
btn-a {
	@include transition(color 0.3s ease-in, background 0.5s ease-out);

Without adding the … to $val the argument would think that there are 2 arguments being passed in. By adding … the $val… becomes a variable argument and can handle the passed value.

Add your comment