Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LessCSS - IE gradient filter with variables and lighten

I need to have an IE gradient filter in Less CSS with a variable and lighten. Is this possible?

#whatever {
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='lighten(@grayColor, 3%)', endColorstr='@greenColor', GradientType=0);
}
like image 433
SteveR Avatar asked Apr 25 '12 22:04

SteveR


1 Answers

As far as I know you can't mix escaping (because that's what you need here) and colour functions (lighen). So you'll need to store the startColor value in another variable.

@grayColor :#dddddd;
@greenColor : #ff0000;
@start : lighten(@grayColor, 3%);
.css {
   filter:~"progid:DXImageTransform.Microsoft.gradient(startColorstr='@{start}', endColorstr='@{greenColor}', GradientType=0)";
}
like image 54
Litek Avatar answered Dec 19 '22 09:12

Litek