I have a function which applies gradients in less as :
.linearGradient(@begin: black, @end: white, @switch : 100%) {
background: @begin;
background: -webkit-gradient(linear, 0 0, 0 100%, from(@begin), color-stop(@switch, @end));
background: -moz-linear-gradient(top, @begin, @end @switch);
background: -o-linear-gradient(top, @begin, @end @switch);
background: linear-gradient(top, @begin, @end @switch);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=@top, endColorstr=@bottom,GradientType=0 ); /* IE6-9 */
}
I want to be able to test for a versions < IE10 and use filter else just use css3.
Edit: Additional questions
Is there a way to test for browsers?
Don’t bother making a test; IE10 doesn’t support the
filterproperty.