I am trying to write LESS code corresponding to the following CSS to generate a gradient in IE.
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff9600',endColorstr='#ff6900');
Below is the LESS code:
.gradient(@start_color, @end_color) { filter:~"progid:DXImageTransform.Microsoft.gradient(startColorstr='"@start_color~"',endColorstr='"@end_color~"')"; } .gradient(
when compiling it gives the following CSS code:
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=' #ff9600 ', endColorstr=' #ff6900 ');
As you can see, spaces are inserted on both sides of the color values, because of which IE does not correctly read the colors.
I compiled LESS code using http://crunchapp.net/ as well as http://winless.org/ and both providing the same results. Is there a hack to avoid these spaces. Thanks.
Tuhin paul
source share