【问题标题】:Using susy with libsass - wrong output将 susy 与 libsass 一起使用 - 输出错误
【发布时间】:2015-10-20 19:04:33
【问题描述】:

我正在使用 libsass,因为它比 ruby​​ sass 更快,并且使用 bower 导入 susy。

@import "../bower_components/susy/sass/susy";

$susy: (
    columns: 12,
    gutter-position: inside,
    global-box-sizing: border-box
);

#content {
    background-color: red;
    @include span(9);
}

#sidebar {
    background-color: blue;
    @include span(3);
}

输出是:

#content {
  background-color: red;
  width: 75%;
  float: left;
  padding-left: 0.8333333333%;
  padding-right: 0.8333333333%;
}

#sidebar {
  background-color: blue;
  width: 25%;
  float: left;
  padding-left: 0.8333333333%;
  padding-right: 0.8333333333%;
}

它不能正常工作,它会破坏页面。但是 ruby​​ sass 输出仅将填充更改为 0.83333% 并且一切正常。

正如您在上面看到的那样,libsass 填充输出与 ruby​​ sass 输出完全不同。

出了什么问题以及如何解决?

【问题讨论】:

    标签: css sass susy susy-sass libsass


    【解决方案1】:

    发现一点都没错,忘记加了:@include border-box-sizing;

    我希望它可以帮助其他人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-23
      • 1970-01-01
      • 2019-07-25
      • 2015-04-30
      • 1970-01-01
      • 2021-06-25
      相关资源
      最近更新 更多