Reputation: 13430
By using Less I need to escape a string which LESS doesn’t recognize.
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=#26ffffff, endColorstr=#24ffffff)";
At the same time I need to pass two variables startColor and endColor to this string
.get-ARGB(@startColor, @endColor){
/* ARGB backgrounds for IE 7+8 (black background with 50% transparancy) */
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=@startColor, endColorstr=@endColor)";
}
Any ideas how can I do it?
Upvotes: 7
Views: 2771
Reputation: 1727
Use string interpolation:
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{startColor}, endColorstr=@{endColor})";
Upvotes: 10