Internet explorer 在断点处回退会导致错误
我找到了一个主题,其中声明您可以将“回退类”添加到变量中,以便在使用该变量的所有指定断点处应用它 所以我改变了我的变量:Internet explorer 在断点处回退会导致错误,internet-explorer,susy-compass,fallback,Internet Explorer,Susy Compass,Fallback,我找到了一个主题,其中声明您可以将“回退类”添加到变量中,以便在使用该变量的所有指定断点处应用它 所以我改变了我的变量: $desk: 58em 12; 到 但这会导致如下错误: Syntax error: Base-level rules cannot contain the parent-se1ector-referencing character ' & ' . on line 91 of C: /Ruby200/lib/ruby/gems/2.0.0/g
$desk: 58em 12;
到
但这会导致如下错误:
Syntax error: Base-level rules cannot contain the parent-se1ector-referencing character ' & ' .
on line 91 of C: /Ruby200/lib/ruby/gems/2.0.0/gems/susy-1.0.9/sass/susy/_media.scss, in ‘ Gcontent '
from line 15 of C: /Ruby200/lib/ruby/gems/2.0.0/gems/susy-1.0.9/sass/susy/_media.scss, in ‘ layout '
from line 54 of C: /Ruby200/lib/ruby/gems/2.0.0/gems/susy-1.0.9/sass/susy/_media.scss, in ‘ at-breakpoint '
from line 87 of C: /localpath/sass/layouts/project/site.layout.scss
最后一行是第一行,第一次调用媒体布局变量“$desk”
@include at-breakpoint($desk) {
.l-header,
.l-main,
.l-footer,
.l-region--navigation {
@include set-container-width; // Reset only the container width (elements have already been declared as containers).
}
我是否遗漏了一些明显的语法错误?这是一个Sass问题,应该在Sass 3.3(目前为alpha)中修复。为了设置回退类,Susy必须使用Sass父选择器(
&
),但当没有父选择器时,该选择器将失败。我们一直在跟踪这个问题,您可以在该线程中找到一些解决方法。基本上,如果使用回退类(Sass 3.3之前),则必须将嵌套在另一个选择器中的断点处。在大多数情况下(包括您的),这是一个简单的操作,如在现有选择器中移动mixin:
.l-header,
.l-main,
.l-footer,
.l-region--navigation {
@include at-breakpoint($desk) {
@include set-container-width;
}
}
谢谢你的回答,埃里克,我自己找不到这个。
.l-header,
.l-main,
.l-footer,
.l-region--navigation {
@include at-breakpoint($desk) {
@include set-container-width;
}
}