These are chat archives for less/less.js

26th
Sep 2017
Calvin Juárez
@calvinjuarez
Sep 26 2017 21:38
Autoprefixer would be my first recommendation as a part of your build process. Another option is to write a mixin. Something like this:
.background-linear-gradient(@color1, @color2) {
  background: -webkit-linear-gradient(@color1, @color2);
  background: -moz-linear-gradient(@color1, @color2);
  background: -o-linear-gradient(@color1,@color2);
  background: -ms-linear-gradient(@color1, @color2);
  background: linear-gradient(@color1, @color2);
}
Then you'd use it like this:
.whatever-has-the-gradient-background {
  .background-linear-gradient(@white, #d3d3d3);
}