diff options
| author | Sojaner <[email protected]> | 2014-02-27 12:35:58 +0330 |
|---|---|---|
| committer | Sojaner <[email protected]> | 2014-02-27 12:35:58 +0330 |
| commit | 77cd015cf001856e1530babfa47b013bd08ab2ad (patch) | |
| tree | 91b229a37543a51b2f51e4ca75e78c830dc906e9 | |
| parent | 1e06cdff2f6eddbe8392ce7ac6e93c321e293804 (diff) | |
| download | bootstrap-77cd015cf001856e1530babfa47b013bd08ab2ad.tar.xz bootstrap-77cd015cf001856e1530babfa47b013bd08ab2ad.zip | |
Fix for issue #12854 where push and pull resets
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%.
| -rw-r--r-- | less/mixins.less | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/less/mixins.less b/less/mixins.less index 4432cfc2d..d024a36ad 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -827,16 +827,26 @@ 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)); |
