-
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
Variable in url(..) not possible #190
Comments
Running into this myself. Would be extremely handy for setting base paths. |
Try This:
|
That's odd, it works just fine here. |
@cloudhead I was pointing out to funkatron & trilin how I got it to work. |
for anyone else who comes across this issue i found i couldn't get @jiggliemon's solution to work (less 1.1.4) but based on http://lesscss.org/#-string-interpolation this worked for me
i suppose this ticket could be closed? |
This only happens in browser environments and is caused by the relative path “fixing” code in the tree.URL ctor. It does not check that val.value actually exists before trying to operate on it. |
This is an issue when trying to use Twitter Bootstrap 2.0 with less.js in the browser environment. Bootstrap uses the url(@url) format to pull sprite images in in sprites.less. less.js chokes on the undefined val.value that's passed to tree.URL() and an error is thrown, causing bootstrap not to load. @csnover 's change resolves the issue for me. I have updated my local copy of less.js so it's smooth sailing for me, but since this issue prevents Twitter Bootstrap 2.0 from running in the browser environment I hope it will get resolved soon, since others are probably having the same problem. E.g. I'm guessing this SO question might be related: http://stackoverflow.com/questions/8095499/twitter-bootstrap-wont-work-with-less-js |
Is the fix available in current release? (asking as I see the bug is still open). |
I tried to make a function, that using an argument as url(..) value.
e.a.
i got a "could not call charAt of undefined" from line 2183 (v 1.0.41), because val.value is undefined.
currently its only possible this way
The text was updated successfully, but these errors were encountered: