how does $icon-font-path works in bootstrap scss?

后端 未结 4 624
臣服心动
臣服心动 2021-02-14 01:25

I recently started using bootstrap SCSS on my node project. So I have app/bower_components/bootstrap-sass/lib/_glyphicons.scss for example.

Looking at my CS

4条回答
  •  忘掉有多难
    2021-02-14 02:20

    @guy mograbi: In Bootstrap-SASS-3.3.6, $icon-font-path in /bootstrap/bootstrap/_variables.scss @83 is declared like this:

    $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;

    Since $bootstrap-sass-asset-helper is not defined yet, it may be useful to include the _variables.scss before overwriting the $icon-include-path, so we can read the "settings" and overwrite the $icon-font-path together with the if() cases.

    We can use something like:

    @include bower_components/bootstrap/bootstrap/_variables.scss;
    $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "/fonts/bootstrap/");
    @include bower_components/bootstrap/bootstrap.scss;
    

提交回复
热议问题