我想要 1/4
尺寸 gutter widths在较小的断点中,然后在较大的断点和更高的断点中,我希望将间距设置为 1/2
。
我如何在 _variables.scss
文件中全局设置它,而不是必须在每个 susy-breakpoint()
中声明它(有很多)?
看起来像下面这样的东西应该可以工作,但它会抛出一个错误。
$susy: (gutters: 1/4);
@include susy-breakpoint($large-width, $large-columns) {
$susy: (gutters: 1/2);
}
[17:56:33] DEPRECATION WARNING on line 50 of _variables.scss: Assigning to global variable "$susy" by default is deprecated. In future versions of Sass, this will create a new local variable. If you want to assign to the global variable, use "$susy: (gutters: 1 / 2) !global" instead. Note that this will be incompatible with Sass 3.2.
使用 $susy: (gutters: 1/2) !global;
不起作用——它只是忽略较大断点中的 1/2 并改用 1/4。
最佳答案
刚刚看了一个Sass Bites episode以 Eric M. Suzanne 为特色,并根据他的一个例子得出结论:
$susy: (gutters: 1/4);
$large-width: 960px;
$large-settings: (gutters: 1/2);
@include susy-breakpoint($large-width, $large-settings) {
}
关于css - 如何使用 Susy 2 在较大的断点中将装订线宽度加倍?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25047718/