Susy 2.0.0.alpha.6 - Undefined mixins'at-breakpoint','remove-nth-omega'

时间:2013-12-16 18:28:40

标签: sass susy-compass compass-sass

使用:

  • susy(2.0.0.alpha.6)
  • sass(3.3.0.rc.2)
  • 指南针(1.0.0.alpha.17)

使用以下SCSS:

$susy: (
    columns: 12,
    column-width: 5em,
    gutter-width: 1em,
    gutter-position: after,
    grid-padding: gutter-width,
);

$small: 36em;
$medium: 50em;
$large: 65em;

.hlt-container{
    @include at-breakpoint($small) {
        @include span(6);
        @include nth-omega(2n);
        margin-bottom: gutter(12);
    }

    @include at-breakpoint($small $large) {
        &:last-child:nth-child(odd){
            float: none;
            clear: both;
            margin-right: auto;
            margin-left: auto;
        }
    }

    @include at-breakpoint($large) {
        @include span(4);
        @include remove-nth-omega(2n,12);
        @include nth-omega(3n);
        margin-bottom: 0;
    }
}

我首先得到错误: error source/scss/style.scss (Line 10 of source/scss/01-molecules/02-blocks/_00-highlight-block.scss: Undefined mixin 'at-breakpoint'.)

如果我移除了at-breakpoint个样式,它会继续移动并在remove-nth-omega上再次阻塞: error source/scss/style.scss (Line 26 of source/scss/01-molecules/02-blocks/_00-highlight-block.scss: Undefined mixin 'remove-nth-omega'.)

我搜索过文档并搜索了我能想到的所有内容,但似乎无法找到问题,例如,{@ 1}}和at-breakpoint可能会被Susy Next弃用。

修改

如果我改回

  • 指南针(0.12.2)
  • sass(3.2.12)
  • susy(1.0.9)

(谢天谢地,RVM和宝石)

并恢复.scss以反映较早的Susy语法:

remove-nth-omega

一切正常。

2 个答案:

答案 0 :(得分:10)

如果你想使用旧的susy语法,那么写:

// With Susy 2 installed...
   @import "susyone";

而不是

// With Susy 2 installed...
   @import "susy";

我在断点处遇到了同样的问题,一旦我切换它就没事了。 > susy documentation

答案 1 :(得分:4)

是的,这两个mixin都在Susy 2.0中被弃用,因此alpha版本都没有。我们还没有建立一个干净的升级路径,但我保证会有一个路径。