Bootstrap 4中的SASS错误

时间:2017-05-12 12:25:11

标签: twitter-bootstrap sass

我使用SASS进行bootstrap 4

@include media-breakpoint-up(sm) {
  .some-class {
    display: block;
  }
}

并收到错误

Error: Undefined mixin 'media-breakpoint-up'.
        on line 1 of sass/main.scss, in `media-breakpoint-up'
        from line 1 of sass/main.scss

有谁知道为什么?

我已经包含了

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>

提前致谢!

1 个答案:

答案 0 :(得分:0)

您错误地定义了mixin。它看起来应该如下所示。

@mixin media-breakpoint-up(sm) {
  .some-class {
    display: block;
  }
}

如果你想使用它,请按以下方式调用:

@include media-breakpoint-up(sm-value);

我发现您没有使用输入sm