Sass Susy 2:如何删除;最后一句话;从不同断点上的第n个子节点开始?
我正在使用Susy 2,我有以下代码:Sass Susy 2:如何删除;最后一句话;从不同断点上的第n个子节点开始?,sass,susy-compass,Sass,Susy Compass,我正在使用Susy 2,我有以下代码: @include breakpoint($tab) { .l-region--sections { > .block { @include span(6 of 12); &:nth-child(2n) { @include last; } } } } @include breakpoint($desk) { .l-region--sections { &
@include breakpoint($tab) {
.l-region--sections {
> .block {
@include span(6 of 12);
&:nth-child(2n) {
@include last;
}
}
}
}
@include breakpoint($desk) {
.l-region--sections {
> .block {
@include span(4 of 16);
&:last-child {
@include last;
}
}
}
}
问题是,在桌面宽度上,“:nth child(2n)”生效,我想完全删除它,以支持“:last child”。如何删除桌面的“:nth child(2n)”样式?答案似乎如下:,基本上:
@include breakpoint($tab) {
.l-region--sections {
> .block {
@include span(6 of 12);
&:nth-child(2n) {
@include last;
}
}
}
}
@include breakpoint($desk) {
.l-region--sections {
> .block {
@include span(4 of 16);
&:nth-child(2n) {
@include span(4 of 16); // We are declaring span for this container here once more, just to override nth-child styles.
}
&:last-child {
@include last;
}
}
}
}