thomaspark / bootswatch

Themes for Bootstrap
https://bootswatch.com
MIT License
14.54k stars 3.67k forks source link

bootswatch themes 3.3.7 with web-font fails to compile with less 3.0.4 #841

Closed kitsguru closed 6 years ago

kitsguru commented 6 years ago

Trying to recompile the 3.3.7 less themes with less 3.0.4 fails with the following error:

/themes/cosmo/bootswatch.less: [L10:C0] variable @path is undefined
Warning: Error compiling www/_src/less/theme-cosmo.less Use --force to continue.

Code in question is:

@web-font-path: "https://fonts.googleapis.com/css?family=Roboto:400,700";

.web-font(@path) {
  @import url("@{path}");
}
.web-font(@web-font-path);

I can't see why this would fail or why @path is now considered undefined. Any ideas would be appreciated.

thomaspark commented 6 years ago

Related to https://github.com/less/less.js/issues/3188?

Can you try @import (css) url("@{path}"); and see if it fixes it for you?

kitsguru commented 6 years ago

Bingo - that did it. Are you going to fix the various themes. I am slowing converting to Bootstrap 4 but not ready yet. Also I see that they are going to do a bootstrap 3.4.

thomaspark commented 6 years ago

Pushing a fix for all v3 themes now. It'll be updated for the website now and for packages next time the version number ticks.