-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
urls stored in variables - a few issues #26
Comments
Hey, I might have something just for you: try the escape function:
Output:
|
There's also a format function:
Output
And they can be used together. |
Thanks
would output this: Is something similar implemented? |
Thanks. And scratch the last post (started writing before you posted your 2nd)... |
great. |
I don't understand why the compiler doesn't stop given your input. I get the following error:
we should catch all these when we add tests for error cases |
While lessc is running, node takes 100% of my CPU. I case there's a need for some data: |
cloudhead: I tried the format function: |
|
thanks. too bad there's another issue --> http://github.com/cloudhead/less.js/issues/issue/27 |
It's quite possible that I simply don't know how to achieve what I want.
I was trying to hold background url in a variable. Couldn't do so, because:
One. I can't store a string with a colon (:) without enquoting the string.
@url: http://example.com;
div {
something: @url;
}
makes lessc run indefinitely (it just doesn't stop running)
Two. when I enquote the string (with either single or double quotation marks):
@url: "http://example.com";
div {
something: @url;
}
quotation marks are printed when I use this var
muszek@bobek:~/www/fooba/webroot/css$ ./less.sh test
div {
something: "http://example.com";
}
Three. finally, I can't seem to concatenate strings
@url: "http://example.com/a.png";
div {
background-url: url(@url);
}
turns to
div {
background-url: url(@url);
}
I tried different approaches, none of them worked. Is it possible to concatenate strings? It's very handy, for example in cases when you keep a path to images directory in one variable.
The text was updated successfully, but these errors were encountered: