I'm writing a sass code to get css output as given below.
background: -webkit-linear-gradient(top, 50%);
background: -moz-linear-gradient(top, 50%);
background: linear-gradient(top, 50%);
The sass mixin code i wrote for this is:
@mixin linear-gradient($name, $arg1, $arg2){
@each $vendor in ('-webkit-', '-moz-','') {
background: #{$vendor}#{$name}(#{$arg1}, #{$arg2});
}
}
@include linear-gradient(linear-gradient, top, 50%);
But i was getting error. Can anyone tell why?