diff --git a/scss/bootstrap-grid.scss b/scss/bootstrap-grid.scss index 8a76c9956e..4abb6822ab 100644 --- a/scss/bootstrap-grid.scss +++ b/scss/bootstrap-grid.scss @@ -5,15 +5,7 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -html { - box-sizing: border-box; -} - -*, -*::before, -*::after { - box-sizing: inherit; -} +$include-column-box-sizing: true !default; @import "functions"; @import "variables"; diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index ef97a61bfa..aa71a39a26 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -10,6 +10,8 @@ } @mixin make-col-ready($gutter: $grid-gutter-width) { + // Add box sizing if only the grid is loaded + box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null); // Prevent columns from becoming too narrow when at smaller grid tiers by // always setting `width: 100%;`. This works because we set the width // later on to override this initial width.