Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorysds <ysds.code@gmail.com>2019-08-28 17:37:39 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-09-26 18:37:07 +0300
commitafc9cae32c2677943401a3ce5ae621d66173610c (patch)
treeabebbbb4f4ee2dec82b0aea20c80aaaf5b050ca2 /scss
parentd08567797f9da9fc8f3030a1ce5ba54b82df1824 (diff)
Allow override default col width
Diffstat (limited to 'scss')
-rw-r--r--scss/_grid.scss10
-rw-r--r--scss/mixins/_grid-framework.scss7
-rw-r--r--scss/mixins/_grid.scss5
3 files changed, 10 insertions, 12 deletions
diff --git a/scss/_grid.scss b/scss/_grid.scss
index 5f25e38f18..d36ee75d88 100644
--- a/scss/_grid.scss
+++ b/scss/_grid.scss
@@ -46,16 +46,6 @@
@include make-row();
}
- @each $breakpoint in map-keys($grid-breakpoints) {
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
- @for $i from 1 through $grid-row-columns {
- .row-cols#{$infix}-#{$i} {
- @include row-cols($i);
- }
- }
- }
-
// Remove the negative margin from default .row, then the horizontal padding
// from all immediate children columns (to prevent runaway style inheritance).
.no-gutters {
diff --git a/scss/mixins/_grid-framework.scss b/scss/mixins/_grid-framework.scss
index 649c28bf77..80fc7cc4b3 100644
--- a/scss/mixins/_grid-framework.scss
+++ b/scss/mixins/_grid-framework.scss
@@ -33,6 +33,13 @@
flex-grow: 1;
max-width: 100%;
}
+
+ @for $i from 1 through $grid-row-columns {
+ .row-cols#{$infix}-#{$i} {
+ @include row-cols($i);
+ }
+ }
+
.col#{$infix}-auto {
flex: 0 0 auto;
width: auto;
diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss
index 8672e7c163..339fd9c083 100644
--- a/scss/mixins/_grid.scss
+++ b/scss/mixins/_grid.scss
@@ -56,7 +56,8 @@
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
// style grid.
@mixin row-cols($count) {
- & > [class^="col"] {
- flex: 0 0 calc(100% / #{$count});
+ & > * {
+ flex: 0 0 100% / $count;
+ max-width: 100% / $count;
}
}