cloudhead/less.js — Issue #534: mixin with IE filter repeating old parameter values
Author: wkeese
Created: 2011-12-26 23:25:39+00:00
State: open

Thanks for getting IE filters to work without the %(..., val1, val2) or ~"..." workaround. There's a bug with variable substitution though, with repeated calls to the same mixin:

```less
.vertical-gradient(@color) {
background-color: @color; // the base color
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=@color, endColorstr=@color);
}

.rule1 {
.vertical-gradient(#fff);
}

.rule2 {
.vertical-gradient(#000);
}
```

The generated CSS for .rule2 is:

```css
.rule2 {
background-color: #000000;
filter: progid:dximagetransform.microsoft.gradient(startColorstr=#ffffff, endColorstr=#ffffff);
}
```

Note that background-color gets the correct parameter value of #00000, but the filter clause gets the #ffffff parameter value from the previous call to the mixin.

BTW, you should update the website to explain the %() printf type method, and the e() method, and change the example of the ~"...", since it implies that it's needed for filters which is no longer the case.