【发布时间】:2015-03-17 09:59:20
【问题描述】:
我已经使用奇异性大约一年了,但我仍然没有 100% 充分发挥它的潜力,或者说真的是“正确”的方式。
我的主要问题是为什么要根据媒体查询更改网格大小。
我现在正在使用这样的 SGS:
grids: 12;
$gutters: 1/2;
.column {
// mobile first ... full-width
@include breakpoint($from-medium) { // 2 columns on medium devices
@include grid-span(6, first);
&:nth-child(even) {
@include grid-span(6, last);
}
}
@include breakpoint($from-large) { // 3 columns on larger devices
@include grid-span(4);
&:nth-child(even) {
@include grid-span(4); // needed to override previous MQ since I'm only using min-width.
}
&:nth-child(3n) {
@include grid-span(4, last);
}
&:nth-child(3n+1) {
@include grid-span(4, first);
}
}
}
我很想为此减少代码,也许更改 MQ 之间的网格可能会有所帮助,但我不知道如何?
【问题讨论】:
-
糟糕,我刚刚意识到我回答了一个不同的问题。您是否在问为什么需要为每个媒体查询重新应用 span?
标签: singularitygs