I’m trying to do this in LESS (using the JS version):-
.gradient-horizontal (@from, @to, @fallback)
{
background: -webkit-gradient(linear, left top, right top, from(@from), to(@to)); /* for webkit browsers */
background: -moz-linear-gradient(left, @from, @to); /* for firefox 3.6+ */
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='@from', endColorstr='@to'); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='@from', endColorstr='@to')"; /* IE8 */
}
It seems to work fine for Firefox and Chrome, and if I replace the @from and @to in the IE lines with literal colours it works, but as you see it above it looks like the @from and @to are being passed through unmodified when surrounded by single quotes. However, the IE code will not work without them.
Is there a way around this?
This seems to work:-