我知道你可以全局地为suzy网格设置装订线:
$susy: (
columns: 12,
gutters: 0.32,
}
您还可以为特定类覆盖它:
.something {
@include span(1 of 3);
@include gutters(1em);
}
但是您可以覆盖某些文件的装订线吗?
如果下面的代码是我的代码的简化版本,那么使 row1 与 row2s 具有不同装订线的最短方法是什么?
<div class="container1">
<div class="row1">
// Something
</div>
<div class="row1">
// Something
</div>
<div class="row1">
<div class="container1">
<div class="row1">
// Something
</div>
<div class="row1">
// Something
</div>
<div class="row1">
// Something
</div>
</div>
</div>
</div>
<div class="container2">
<div class="row2">
// Something
</div>
<div class="row2">
// Something
</div>
<div class="row2">
<div class="container2">
<div class="row2">
// Something
</div>
<div class="row2">
// Something
</div>
<div class="row2">
// Something
</div>
</div>
</div>
</div>
您可以使用with-layout
函数为任何内容组设置特殊网格:
$susy: (gutters: 0.3);
// everything out here will use 0.3 gutters...
@include with-layout((gutters: 0.5)) {
// everything in here will use 0.5 gutters...
.row2 {
@include span(3);
}
}
// everything out here will use 0.3 gutters again...
mixin 接受任何标准的 Susy 网格地图(上面使用)或网格速记作为参数。您可以从文档中获取更多详细信息。