cloudhead/less.js — Issue #574: Double quotes in strings
Author: deains
Created: 2012-01-16 12:24:17+00:00
State: open

I'm looking for a way to have LESS output a string surrounded by double quotes. This is for the new -ms-filter property, which unlike filter, should have its value surrounded by double quotes, like so:

-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#edb500', endColorstr='#e97500',GradientType=0)";

Which makes it valid CSS, unlike the old filter rule. The code I'm using to try and output the above line is:

-ms-filter: ~"\"progid:DXImageTransform.Microsoft.gradient(startColorstr='@{stopa}', endColorstr='@{stopb}',GradientType=0)\"";

However the \" syntax doesn't seem to work, and I get:

-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr='#edb500', endColorstr='#e97500',GradientType=0)\";

Which is obviously incorrect. Is there another way of including " within a string? I tried playing around with `e(%())`, but it didn't seem to work either.