【问题标题】:What happened with gutter function/mixin in Susy 2?Susy 2 中的 gutter 函数/mixin 发生了什么?
【发布时间】:2015-01-26 00:49:35
【问题描述】:

这是我的 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% plus null”

有什么问题?

【问题讨论】:

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


    【解决方案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%;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-06-29
      • 1970-01-01
      • 2016-08-06
      • 2018-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多