aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2016-12-24 17:25:27 -0800
committerMark Otto <[email protected]>2016-12-25 15:28:44 -0800
commit31b9d93ffd0897ad72e7a70064dfdd58d87bdfb7 (patch)
tree43f808cbecdbf8378b9bb208a85f7878d871cb93
parentc214aa32d0820b554d11d9d2e5b798e066973997 (diff)
downloadbootstrap-31b9d93ffd0897ad72e7a70064dfdd58d87bdfb7.tar.xz
bootstrap-31b9d93ffd0897ad72e7a70064dfdd58d87bdfb7.zip
Enable flex on the .modal-content, ensure .modal-body stretches the height (if needed)
-rw-r--r--scss/_modal.scss5
1 files changed, 5 insertions, 0 deletions
diff --git a/scss/_modal.scss b/scss/_modal.scss
index 87be3df44..a1ef18624 100644
--- a/scss/_modal.scss
+++ b/scss/_modal.scss
@@ -48,6 +48,8 @@
// Actual modal
.modal-content {
position: relative;
+ display: flex;
+ flex-direction: column;
background-color: $modal-content-bg;
background-clip: padding-box;
border: $modal-content-border-width solid $modal-content-border-color;
@@ -94,6 +96,9 @@
// Where all modal content resides (sibling of .modal-header and .modal-footer)
.modal-body {
position: relative;
+ // Enable `flex-grow: 1` so that the body take up as much space as possible
+ // when should there be a fixed height on `.modal-dialog`.
+ flex: 1 1 auto;
padding: $modal-inner-padding;
}