Reputation: 53597
I have the following pure CSS rule:
#cboxOverlay{
background:url(images/overlay.png) repeat 0 0;
opacity: 0.9;
filter: alpha(opacity = 90);
}
When I compile it with less (lessc
) It confuses the alpha(opacity = 90)
to be a Less function.
How do I escape alpha(opacity = 90)
to be treated as simple CSS?
Upvotes: 2
Views: 258
Reputation: 46
This should work:
#cboxOverlay{
background:url(images/overlay.png) repeat 0 0;
opacity: 0.9;
filter: ~"alpha(opacity = 90)";
}
See also: http://lesscss.org/#escaping
Upvotes: 1
Reputation: 12025
In order to escape strings, you need to wrap it like this ~'<string>'
, it will make the compiler to output the string as-is.
Change:
filter: alpha(opacity = 90);
To:
filter: ~'alpha(opacity = 90)';
Upvotes: 1