这是我在 Susy 2 中从未理解过的东西。
看这个简单的例子可以看出:
http://codepen.io/itsthomas/pen/Btzxa
HTML:
<div id="wrapper">
<div id="content">
<div class="box1">Box1</div>
<div class="box1">Box1</div>
<div class="box1">Box1</div>
</div>
<aside>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae.</p>
</aside>
</div>
萨斯:
@import 'susy';
@include border-box-sizing;
$susy: (
container: 90%,
columns: 24,
gutters: 1/3,
/* global-box-sizing: border-box, */
debug: (
image: show,
output: overlay,
),
);
#wrapper {
@include container;
}
#content {
@include span(18 first);
background-color: red;
height: 100px;
padding: gutter();
}
aside {
@include span(6 last);
background-color: #F0A754;
padding: gutter();
}
.box1 {
@include span(6 of 18);
height: 40px;
background-color: #6D4214;
&:last-child {
/* margin-right: 0; */
@include last;
}
}
将global-box-sizing: border-box,添加到 $susy 地图根本不会改变任何东西,无论您是否使用 @include border-box-sizing; 在你的代码中与否。
$susy 设置 global-box-sizing 对我来说似乎完全没用。还是我忽略了什么?
谢谢