less.ruby icon indicating copy to clipboard operation
less.ruby copied to clipboard

define empty string variable

Open vol4ok opened this issue 13 years ago • 3 comments

I want to define a variable, which could be empty in some cases @prefix: ""; and to use it like this src: url("@{prefix}/path/to/something"); the problem is that it compiles into src: url("""/path/to/something");

How to define an empty string variable, that can be compiled in src: url("/path/to/something");

vol4ok avatar Dec 15 '11 10:12 vol4ok

I have the same issue! Try to use @prefix: " ";

MarianaSilva avatar Dec 19 '11 14:12 MarianaSilva

@prefix: "";
header {
    background: url('@{prefix}logo.png');
}

Works great for me. If that doesn't work you could change it to this which sets it to be empty with javascript.

@prefix: ~'';

joeldrapper avatar Feb 03 '12 21:02 joeldrapper

I use: @prefix: ;

and its empty :)

gacekssj4 avatar Jun 17 '15 21:06 gacekssj4