Reputation: 44275
@root: "/images";
@app-root: `"@{root}".toUpperCase()`;
#form {
background: url("@{app-root}/back.jpg");
}
Running this in LESS2CSS I get error:
SyntaxError: JavaScript evaluation error: Unexpected string from
""/images"".toUpperCase()
on line 2, column 12:1 @root: "/images"; 2 @app-root:
"@{root}".toUpperCase()
; 3
Supposedly all I need to run JS in LESS is a set of backticks. So, why does this fail?
Upvotes: 2
Views: 40
Reputation: 71901
Remove the double quotes, and you are good to go:
@app-root: `@{root}.toUpperCase()`;
Upvotes: 3