diff options
| author | Mark Otto <[email protected]> | 2015-04-25 21:42:44 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2015-04-25 21:42:44 -0700 |
| commit | 2b1c06f5b190f8999f55360a0f6c79f4e0521e03 (patch) | |
| tree | f5204fdd6d4e160df9419bd8ba5420d8cf4ede1d | |
| parent | 4f3feed2bd9a18180a3aa97478b27c34cd042e96 (diff) | |
| parent | c319d610e2043478fdcdba0f1f03daef784a410e (diff) | |
| download | bootstrap-2b1c06f5b190f8999f55360a0f6c79f4e0521e03.tar.xz bootstrap-2b1c06f5b190f8999f55360a0f6c79f4e0521e03.zip | |
Merge pull request #16351 from thomasphorton/gutterRounding
Round results from gutter division to prevent decimal margins and padding
| -rw-r--r-- | less/forms.less | 2 | ||||
| -rw-r--r-- | less/mixins/grid-framework.less | 4 | ||||
| -rw-r--r-- | less/mixins/grid.less | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/less/forms.less b/less/forms.less index 6dc1641b6..d1efabdab 100644 --- a/less/forms.less +++ b/less/forms.less @@ -576,7 +576,7 @@ input[type="checkbox"] { // Reposition the icon because it's now within a grid column and columns have // `position: relative;` on them. Also accounts for the grid gutter padding. .has-feedback .form-control-feedback { - right: (@grid-gutter-width / 2); + right: floor((@grid-gutter-width / 2)); } // Form group sizes diff --git a/less/mixins/grid-framework.less b/less/mixins/grid-framework.less index f3b3929d6..8c23eed24 100644 --- a/less/mixins/grid-framework.less +++ b/less/mixins/grid-framework.less @@ -19,8 +19,8 @@ // Prevent columns from collapsing when empty min-height: 1px; // Inner gutter via padding - padding-left: (@grid-gutter-width / 2); - padding-right: (@grid-gutter-width / 2); + padding-left: ceil((@grid-gutter-width / 2)); + padding-right: floor((@grid-gutter-width / 2)); } } .col(1); // kickstart it diff --git a/less/mixins/grid.less b/less/mixins/grid.less index cae5eaff9..f144c15f4 100644 --- a/less/mixins/grid.less +++ b/less/mixins/grid.less @@ -13,8 +13,8 @@ // Creates a wrapper for a series of columns .make-row(@gutter: @grid-gutter-width) { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); + margin-left: ceil((@gutter / -2)); + margin-right: floor((@gutter / -2)); &:extend(.clearfix all); } |
