Closed small-carbon closed 8 years ago
Add (css)
into import, like this:
@web-font-path: "https://fonts.googleapis.com/css?family=Source+Sans+pro:300,400,700";
.web-font(@path) {
@import (css) url("@{path}");
}
.web-font(@web-font-path);
Explanations: when there is no file suffix, less import assumes that you are trying to import less file and therefore tries to load it and parse it. You have to add css
option to override it.
Links:
Keeping it open, because error message is wrong. It should not show @{path}
, but evaluated url("https://fonts.googleapis.com/css?family=Source+Sans+pro:300,400,700")
instead.
I have investigated some more. Unfortunately, the construction you are using is not supported yet, neither in less4j nor in less.js - see this open issue. I am going to close this issue, because less4j is supposed to behave as closely to less.js as possible. If the issue gets fixed in less.js, I will port the solution here.
*.less![image](https://cloud.githubusercontent.com/assets/887531/13104708/b310f16c-d599-11e5-893b-293d5e7eb174.png)
Error :![image](https://cloud.githubusercontent.com/assets/887531/13104635/3bbde55c-d599-11e5-98c3-2a899caf9b69.png)