I have been developing a SASS code to generate CSS output that has the following format.
background: -webkit-linear-gradient(top, 50%);
background: -moz-linear-gradient(top, 50%);
background: linear-gradient(top, 50%);
This is the SASS mixin code I created for this purpose:
@mixin linear-gradient($name, $arg1, $arg2){
@each $vendor in ('-webkit-', '-moz-','') {
background: #{$vendor}#{$name}(#{$arg1}, #{$arg2});
}
}
@include linear-gradient(linear-gradient, top, 50%);
However, I encountered an error while testing it. Can someone help me figure out why?