]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
lets the centered modal have any height (#24803)
authorAndres Galante <agalante@gmail.com>
Fri, 24 Nov 2017 22:28:58 +0000 (19:28 -0300)
committerMark Otto <markd.otto@gmail.com>
Fri, 24 Nov 2017 22:28:58 +0000 (14:28 -0800)
docs/4.0/components/modal.md
scss/_modal.scss

index 214ed01169ea526f944d138425179737c964a55b..5a6e000e92688daa6c7957955b8b1bdf5c02ff01 100644 (file)
@@ -210,7 +210,7 @@ When modals become too long for the user's viewport or device, they scroll indep
 
 ### Vertically centered
 
-Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal. **Do not use this with long modals**—it will overflow the viewport and potentially hide parts of your modal.
+Add `.modal-dialog-centered` to `.modal-dialog` to vertically center the modal.
 
 <div id="exampleModalCenter" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
   <div class="modal-dialog modal-dialog-centered" role="document">
index bd4abc7c6410f5f06b2210419aff6728258768da..edda836636dc2fcd2d2be0c829e3f36e4ea7b133 100644 (file)
@@ -53,9 +53,7 @@
 .modal-dialog-centered {
   display: flex;
   align-items: center;
-  height: 100%;
-  margin-top: 0;
-  margin-bottom: 0;
+  min-height: calc(100% - (#{$modal-dialog-margin} * 2));
 }
 
 // Actual modal
   }
 
   .modal-dialog-centered {
-    margin-top: 0;
-    margin-bottom: 0;
+    min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
   }
 
   .modal-content {