[英]Different gutters with susy sass
I have this susy settings: 我有这个可疑的设置:
$susy: (
columns: 8,
gutters: 1/4,
global-box-sizing: border-box,
);
Sometimes I need different gutters instead 1/4. 有时我需要不同的装订线,而不是1/4。
See image for example: 例如,请参见图片:
And the code: 和代码:
.wrap {
@include clearfix;
@include container (500px);
.box-1 {
@include span(4 of 8);
}
.box-2 {
@include span(4 of 8 last);
}
.box-3 {
@include span(4 of 8 wide no-gutter);
}
.box-4 {
@include span(4 of 8 last);
}
.box-5 {
@include span(3.95 of 8 wide no-gutter);
}
.box-6 {
@include span(4 of 8 last);
}
}
I tried this without success: 我尝试了一下但没有成功:
@include span(4 of 8 wide (gutter-override: 2px));
I found a way to fix it but not if it is correct 我找到了一种解决方法,但是如果正确的话
@include span(3.95 of 8 wide no-gutter);
Thanks 谢谢
You can change the layout like this 您可以像这样更改布局
@include with-layout(12 1/8 fluid float after) {
.box-5 {
@include span(2 of 12);
}
.box-6 {
@include span(10 of 12 last);
}
}
Where the 1/8 is the gutter width. 其中1/8是装订线宽度。
Another solution: 另一个解决方案:
.box-5 {
float:left;
width: span(4 of 8 wide) - 1%;
}
.box-6 {
float:right;
width: span(4 of 8);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.