[英]Shorthand syntax gutters being ignored for span mixin
I've set global settings for susy: 我为怀疑设置了全局设置:
$susy: (
columns: 8,
gutters: 1/4,
);
I want to override the gutters for a couple of span 我想在几个跨度上覆盖排水沟
.tile-left {
@include span(1 of 2 1px);
}
.tile-right {
@include span(1 at 2 of 2 1px);
}
Generated css 生成的CSS
.tile-left {
width: 44.44444%;
float: left;
margin-right: 11.11111%;
}
.tile-right {
width: 44.44444%;
float: right;
margin-right: 0;
}
I've also tried these and these don't seem to be working either 我也尝试过这些,这些似乎也不起作用
@include span(1 of 2 no-gutters);
& 和
@include span(1 of 2 (gutter-override: 1px));
Looks like the "1px" argument didnt work because gutters can only be defined by a ratio value; 看起来“ 1px”参数无效,因为装订线只能由比率值定义; Documentation
文献资料
Furthermore, I've solved my issue of wanting fluid elements and a static gutter by doing this: 此外,通过执行以下操作,我已经解决了需要流动元素和静态装订线的问题:
.tile-left {
@include span(1 of 2 (gutter-override: no-gutters, gutter-position: inside-static));
border-right: 1px solid #E5E5E5;
}
.tile-right {
@include span(1 of 2 (gutter-override: no-gutters, gutter-position: inside-static));
}
It looks like when you remove the gutters by passing "gutter-override: no-gutters" it calculates the width with gutters, but then removes the margins; 看起来,当您通过传递“装订线覆盖:无装订线”来删除装订线时,它会计算装订线的宽度,但是会删除边距; By putting the gutters/margin inside by passing "gutter-position: inside-static" the with is calculated to span to 100% without gutters.
通过将“装订线槽/边距”传递给“装订线位置:内部静态”,可以将with的范围扩展到100%(无装订线)。
It's not entirely clear in your post what you are trying to achieve. 您的帖子中还不清楚您要实现的目标。
@include span(1 of 2 no-gutters);
should remove the gutter output, but won't change the math. 应该删除装订线输出,但不会改变数学。 If your goal is to change the math so there are no gutters,
@include span(50% no-gutters);
如果您的目标是更改数学以免发生干扰,则
@include span(50% no-gutters);
might be the best option. 可能是最好的选择。 Or
@include span(1 of 2 (gutters: 0));
或
@include span(1 of 2 (gutters: 0));
should give you the same output. 应该给您相同的输出。
UPDATE: even @include span(1 of 2 0);
更新:甚至
@include span(1 of 2 0);
seems to work. 似乎有效。 The
0
is understood as a valid gutter ratio. 0
被理解为有效装订线比率。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.