0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge pull request #18473 from twbs/fix-18036

Remove useless .col-*-offset-12 and .col-xs-offset-0 classes
This commit is contained in:
Chris Rebert 2015-12-23 20:33:37 -07:00
commit 1e8743ec89
2 changed files with 11 additions and 21 deletions

View File

@ -988,10 +988,6 @@ pre code {
left: 100%;
}
.col-xs-offset-0 {
margin-left: 0;
}
.col-xs-offset-1 {
margin-left: 8.333333%;
}
@ -1036,10 +1032,6 @@ pre code {
margin-left: 91.666667%;
}
.col-xs-offset-12 {
margin-left: 100%;
}
@media (min-width: 544px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
@ -1194,9 +1186,6 @@ pre code {
.col-sm-offset-11 {
margin-left: 91.666667%;
}
.col-sm-offset-12 {
margin-left: 100%;
}
}
@media (min-width: 768px) {
@ -1353,9 +1342,6 @@ pre code {
.col-md-offset-11 {
margin-left: 91.666667%;
}
.col-md-offset-12 {
margin-left: 100%;
}
}
@media (min-width: 992px) {
@ -1512,9 +1498,6 @@ pre code {
.col-lg-offset-11 {
margin-left: 91.666667%;
}
.col-lg-offset-12 {
margin-left: 100%;
}
}
@media (min-width: 1200px) {
@ -1671,9 +1654,6 @@ pre code {
.col-xl-offset-11 {
margin-left: 91.666667%;
}
.col-xl-offset-12 {
margin-left: 100%;
}
}
.table {

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)
}
}
}
}
}
}