How you approach this with Bourbon/Neat is going to have to depend on how the @media
mixin works. Your desired output is going to need to look something like this:
.block-grid > li {
float: left;
display: block;
margin-right: 2.68967%;
width: 48.65516%;
}
.block-grid > li:last-child { margin-right: 0; }
@media (max-width: 1024px) {
.block-grid > li:nth-child(2n) { margin-right: 0; }
.block-grid > li:nth-child(2n+1) { clear: left; }
}
So, if $ipad
is just a pixel value, the absolute simplest way to accomplish this is by writing out your media query by hand using that variable:
.block-grid > li {
@include media($iphone) {
@include span-column(4);
}
@media (max-width: $ipad) {
@include omega(3n);
}
@include media($ipad) {
@include span-column(3);
@include omega(4n);
}
}
If it's the result of the new-breakpoint()
function, then you'll just need to create another media query context using max-width (I'm just going by what I can glean from looking at the source/examples, so you'll have to forgive me if this isn't quite right):
$smaller-than-ipad: new-breakpoint(max-width 500px 12); // 12 = total columns, optional
.block-grid > li {
@include media($iphone) {
@include span-column(4);
}
@include media($smaller-than-ipad) {
@include omega(3n);
}
@include media($ipad) {
@include span-column(3);
@include omega(4n);
}
}