@mixin grid($count, $margin) {
box-sizing: border-box;
width: calc( (100% / #{$count}) - (#{$margin} * (#{$count} - 1) / #{$count}) );
margin-top: $margin;
&:nth-of-type(-n + 9999) {
margin-top: $margin;
}
&:nth-of-type(-n + #{$count}) {
margin-top: 0;
}
&:nth-of-type(#{$count}n) {
margin-right: 0;
}
&:not(:nth-child(#{$count}n)) {
margin-right: $margin;
}
}