]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix for issue #12854 where push and pull resets 12863/head
authorSojaner <sojaner@gmail.com>
Thu, 27 Feb 2014 09:05:58 +0000 (12:35 +0330)
committerSojaner <sojaner@gmail.com>
Thu, 27 Feb 2014 09:05:58 +0000 (12:35 +0330)
The col-*-push-0 and col-*-pull-0 classes try to reset the positioning using 0% but this prevents the opposite direction positioning to freeze and not being set correctly.
To fix that, these must set the position to auto instead of 0% with means left:auto and right:auto instead of left:0% and right:0%.

less/mixins.less

index 4432cfc2dbb9413823f852fc1b6253c026d62860..d024a36ad1f5c4bfbff726a3c3ee89945a220308 100644 (file)
     width: percentage((@index / @grid-columns));
   }
 }
-.calc-grid-column(@index, @class, @type) when (@type = push) {
+.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
   .col-@{class}-push-@{index} {
     left: percentage((@index / @grid-columns));
   }
 }
-.calc-grid-column(@index, @class, @type) when (@type = pull) {
+.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
+  .col-@{class}-push-0 {
+    left: auto;
+  }
+}
+.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
   .col-@{class}-pull-@{index} {
     right: percentage((@index / @grid-columns));
   }
 }
+.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
+  .col-@{class}-pull-0 {
+    right: auto;
+  }
+}
 .calc-grid-column(@index, @class, @type) when (@type = offset) {
   .col-@{class}-offset-@{index} {
     margin-left: percentage((@index / @grid-columns));