You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Choose an odd @grid-gutter-width, e.g. @grid-gutter-width: 15px
Compile bootstrap Less-stylesheets
Problem
The left and right margin .row class, which should normally "cancel out" the left and right padding of the .col-*-* classes is actually flipped so that instead cancelling out, there's a one pixel difference between the two:
.row {
margin-left:-7px; /* should be -8px */margin-right:-8px; /* should be -7px */
}
.col-md-12 {
padding-left:8px;
padding-right:7px;
}
Reason
The reason why this happens is that in .row the ceil() and floor()-functions are used on negative numbers: margin-left: ceil(-7.5px) == -7px, as opposed to the .col-*-*-classes where it's used in a standard way on positive numbers: padding-left: ceil(7.5px) == 8px, which ends up giving the one pixel difference. As ceil()/floor() rounds towards negative/positive infinity, rather than towards/away from zero.
Bootstrap 3 is essentially in maintenance mode as we focus on working towards a stable v4. As such, we're only accepting changes to v3's code on a case-by-case basis, usually only for critical bug fixes or docs improvements.
Sorry for the inconvenience, and thanks for the suggestion, but we'll be passing on this change.
Steps to reproduce
@grid-gutter-width
, e.g.@grid-gutter-width: 15px
Problem
The left and right margin
.row
class, which should normally "cancel out" the left and right padding of the.col-*-*
classes is actually flipped so that instead cancelling out, there's a one pixel difference between the two:Reason
The reason why this happens is that in
.row
theceil()
andfloor()
-functions are used on negative numbers:margin-left: ceil(-7.5px) == -7px
, as opposed to the.col-*-*
-classes where it's used in a standard way on positive numbers:padding-left: ceil(7.5px) == 8px
, which ends up giving the one pixel difference. Asceil()
/floor()
rounds towards negative/positive infinity, rather than towards/away from zero.The bug was introduced with the fix for: #16281
The text was updated successfully, but these errors were encountered: