]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Enable flex on the .modal-content, ensure .modal-body stretches the height (if needed)
authorMark Otto <markdotto@gmail.com>
Sun, 25 Dec 2016 01:25:27 +0000 (17:25 -0800)
committerMark Otto <markd.otto@gmail.com>
Sun, 25 Dec 2016 23:28:44 +0000 (15:28 -0800)
scss/_modal.scss

index 87be3df44e82b22099ecf7fb55596c1b83f4df0a..a1ef18624326c6c78364e4657f0508e7b49ffee0 100644 (file)
@@ -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;
 }