如何从两列中删除带嵌套偏移列的边距。我希望确保列中的内容始终是居中的,而且我似乎无法使用@include row (table);混音使其工作。
The 码页
html
<section>
<div class="container">
<div class="col">
<div class="inner">
centered content
</div>
</div>
<div class="col">
<div class="inner">
centered content
</div>
</div>
</div>
</section> SCSS
@import "bourbon";
@import "neat";
section{
@include outer-container(100%);
.container{
@include span-columns(12);
@include fill-parent;
.col{
@include span-columns(6);
border: 2px solid black;
.inner{
@include shift-in-context(1 of 6);
@include span-columns(8 of 12);
background: red;
}
}
}
}发布于 2017-02-17 16:29:48
有一个内置的选择来保持整洁。是reset-display()混音。在.inner类中从表到块重新设置它,我认为您的状态很好。
section {
@include outer-container(100%);
.container {
@include row(table);
@include fill-parent;
.col {
@include span-columns(6);
border: 2px solid black;
.inner {
@include reset-display;
@include shift-in-context(1 of 6);
@include span-columns(8 of 12);
background: red;
}
}
}
}发布于 2017-02-16 11:55:54
https://stackoverflow.com/questions/42272909
复制相似问题