LearnBoost/stylus — Issue #470: Auto Hex Short Tags Breaks IE Filters
Author: cballou
Created: 2011-11-29 16:00:26+00:00
State: open

When trying to create a mixin for IE 6-9 filters for linear gradients, the auto-shortening of hex codes breaks the gradients. The hex codes need to be left alone for this scenario. Possible solutions are to remove certain scenarios from the global find and replace, perhaps for things like the sprintf s() function:

```
two-stop(start, end=start)
add-property(current-property[0], start) /* Fallback */
add-property(current-property[0], -moz-linear-gradient(top, start, end 100%)) /* FF3.6+ */
add-property(current-property[0], -webkit-gradient(linear, left top, left bottom, color-stop(0%,start), color-stop(100%,end))) /* Chrome,Safari4+ */
add-property(current-property[0], -webkit-linear-gradient(top, start 0%,end 100%)) /* Chrome10+,Safari5.1+ */
add-property(current-property[0], -o-linear-gradient(top, start 0%,end 100%)) /* Opera11.10+ */
add-property(current-property[0], -ms-linear-gradient(top, start 0%,end 100%)) /* IE10+ */
add-property(current-property[0], linear-gradient(top, start 0%,start 100%)) /* W3C */
add-property('filter', s("progid:DXImageTransform.Microsoft.gradient( startColorstr='%s', endColorstr='%s',GradientType=0 )",start,end)) /* IE6-9 */
```