diff options
| author | Mark Otto <[email protected]> | 2017-05-26 12:41:07 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-05-26 20:16:12 -0700 |
| commit | 7e1497ddb8570a300cb2ba1a84cc37b278aeab20 (patch) | |
| tree | d554847c9f922d6ba03a29c8633213aa842c8474 | |
| parent | c8c51186f58886b114fbcc4e0b01dd2df3d74d36 (diff) | |
| download | bootstrap-7e1497ddb8570a300cb2ba1a84cc37b278aeab20.tar.xz bootstrap-7e1497ddb8570a300cb2ba1a84cc37b278aeab20.zip | |
Revert simplified grid column styles from #22376
The premise for #22376 was that if we removed the `max-width` and `flex` properties, we could use the column classes as `width` utilities. The problem that I didn't remember at the time is that column classes have horizontal `padding` on them. This doesn't work for setting `width`. Perhaps more importantly, this causes #22649—the automatic sizing of columns is broken with the absence of `flex` styles.
/cc @sachinsinghi
| -rw-r--r-- | scss/mixins/_grid.scss | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index 87920e284..b6d980577 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -67,7 +67,11 @@ } @mixin make-col($size, $columns: $grid-columns) { - width: percentage($size / $columns); + flex: 0 0 percentage($size / $columns); + // Add a `max-width` to ensure content within each column does not blow out + // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari + // do not appear to require this. + max-width: percentage($size / $columns); } @mixin make-col-offset($size, $columns: $grid-columns) { |
