【发布时间】:2014-10-08 05:37:17
【问题描述】:
我正在尝试生成跨列跨度为 4 的 1/5 的排水沟。全局设置是:
$page-width: 1080px;
$susy: (
columns: 12,
math: fluid,
gutter-position: inside,
gutters: 1/4.5, // will be overriden; I think ...
global-box-sizing: border-box,
use-custom: (rem: true),
container: $page-width
);
后跟这个选择器:
.mosaic {
// Setting gutters of 4 * 1/5 single column width,
// to be distributed 2/5 left, 2/5 right
@include gallery(4 of 12 4/5);
}
.mosaic 生成的 CSS 为:
.mosaic {
width: 33.33333%;
float: left;
padding-left: 1.85185%; // Expected/wanted: 3.333...%
padding-right: 1.85185%; // dito
}
我确实希望每边的填充为 4/5 / 12(列)/2(边)= 1/30 = 3.333...%,这将导致 1/5(1/10在每一侧)列跨度的总宽度。
- 如何达到预期效果?
- 填充值 (1.85...%) 是如何计算的?
- 为什么它们不符合我的预期?
【问题讨论】:
标签: susy-compass susy-sass gutter susy susy-next