Before loading less, Site.base is set to http://localhost/images
On my less file (which is in http://localhost/css folder):
@base: Site.base;
body{
background: #71b7d6 url("@{base}/bg.jpg");
}
Output when rendered with Less 1.3:
body{
background: #71b7d6 url("http://localhost/css/http://localhost/images/bg.jpg");
}
It was fine when I had Less 1.1.5.
Does anyone know what happened? I couldn’t find it in their changelog.
It was actually an issue with less. https://github.com/cloudhead/less.js/issues/409
The solution stated in another post suggest set the variable to be a relative path with “/” in the front, however, this restricts the url to be in the same domain.
However, the error will popup somewhere else in the console when the browser try to resolve for simply http://image/bg.png
https://github.com/cloudhead/less.js/issues/409 was resolved a month ago. Update your LESS if you haven’t already.