Remove useless .col-*-offset-12 and .col-xs-offset-0 classes

Fixes #18036

[skip sauce]
[skip validator]
This commit is contained in:
Chris Rebert 2015-12-08 01:50:42 -08:00
parent 223e3505ce
commit c1c1b3885d
1 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,9 @@
padding-left: ($gutter / 2);
padding-right: ($gutter / 2);
}
$breakpoint-counter: 0;
@each $breakpoint in map-keys($breakpoints) {
$breakpoint-counter: ($breakpoint-counter + 1);
@for $i from 1 through $columns {
.col-#{$breakpoint}-#{$i} {
@extend %grid-column;
@ -32,13 +34,21 @@
@include make-col-span($i, $columns);
}
}
@each $modifier in (pull, push, offset) {
@each $modifier in (pull, push) {
@for $i from 0 through $columns {
.col-#{$breakpoint}-#{$modifier}-#{$i} {
@include make-col-modifier($modifier, $i, $columns)
}
}
}
// `$columns - 1` because offsetting by the width of an entire row isn't possible
@for $i from 0 through ($columns - 1) {
@if $breakpoint-counter != 1 or $i != 0 { // Avoid emitting useless .col-xs-offset-0
.col-#{$breakpoint}-offset-#{$i} {
@include make-col-modifier(offset, $i, $columns)
}
}
}
}
}
}