aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2019-12-14 12:45:26 +0100
committerMartijn Cuppens <[email protected]>2020-03-10 20:30:29 +0100
commit5ac9fe8967c0e1797223b18954addbd179bea90e (patch)
tree1d40df3a2073a091d0b7adcec67f1a352cf99689
parent66408b6e59ad53b30f960966cc60662b57a03c17 (diff)
downloadbootstrap-5ac9fe8967c0e1797223b18954addbd179bea90e.tar.xz
bootstrap-5ac9fe8967c0e1797223b18954addbd179bea90e.zip
bootstrap-grid.css: Only apply `box-sizing: border-box` to the columns instead of using the universal selector
-rw-r--r--scss/bootstrap-grid.scss10
-rw-r--r--scss/mixins/_grid.scss2
2 files changed, 3 insertions, 9 deletions
diff --git a/scss/bootstrap-grid.scss b/scss/bootstrap-grid.scss
index 8a76c9956..4abb6822a 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 ef97a61bf..aa71a39a2 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.