thomaspark / bootswatch

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

Web font path resolution #1281

Closed rawnsley closed 11 months ago

rawnsley commented 11 months ago

Fixes https://github.com/thomaspark/bootswatch/issues/1280

thomaspark commented 11 months ago

Hey @rawnsley, with these changes, this happens for me when $web-font-path is set to false.

Warning: Ignoring local @import of "dist/sketchy/false" as resource is missing.
>> No files created.

However this works for me:

@if $web-font-path {
  @import url("#{$web-font-path}");
}

Does it fix your parse issue as well?

rawnsley commented 11 months ago

@thomaspark you are quite right! It was wrong to resolve it in the @if statement, but setting it to an empty string had the same effect (but messier) because the import was ignored. It looks like SASS is stricter on truthiness than JS and you must use false or null. Two wrongs combined to make something not quite right.

thomaspark commented 11 months ago

This looks good to go. Thanks @rawnsley.