在Susy 2中,天沟功能/ mixin发生了什么?

时间:2015-01-26 00:49:36

标签: compass-sass susy-compass susy-sass susy susy-next

这是我的susy配置

$susy: (
    flow: ltr,
    math: fluid,
    output: float,
    gutter-position: right,
    container: 1000px,
    container-position: center,
    columns: 12,
    gutters: .15,
    column-width: false,
    global-box-sizing: content-box,
    last-flow: to,
    debug: (
            image: show,
            color: rgba(#66f, .25),
            output: overlay,
            toggle: top right,
    ),
    use-custom: (
            background-image: true,
            background-options: false,
            box-sizing: true,
            clearfix: false,
            rem: true,
    )
);

测试代码:

.test {
    @include gutter();
    margin-bottom: gutters();
}

编译完成后,他们什么都不返回......

或者

.test {
      margin-left: span(2) + gutters(2);
}

显示错误:无效的空操作:“15.75092%加上null”

有什么问题?

1 个答案:

答案 0 :(得分:1)

您的布局设置错误,因此您的装订线未定义,因此您将获得空值。

它是gutter-position: after,而不是gutter-position: right。 (有效设置为these)。

看到它正常工作here

(扰流警报,代码输出

.test {
  margin-right: 1.0989%;
  margin-bottom: 1.0989%;
}

.test2 {
  background: red;
  margin-left: 22.72766%;
}

问候。

相关问题