assets/stylesheets/bootstrap/_modal.scss in bootstrap-4.1.2 vs assets/stylesheets/bootstrap/_modal.scss in bootstrap-4.1.3
- old
+ new
@@ -2,13 +2,18 @@
// .modal - container to scroll within
// .modal-dialog - positioning shell for the actual modal
// .modal-content - actual modal w/ bg and corners and stuff
-// Kill the scroll on the body
.modal-open {
+ // Kill the scroll on the body
overflow: hidden;
+
+ .modal {
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
}
// Container that the modal scrolls within
.modal {
position: fixed;
@@ -23,15 +28,10 @@
// https://github.com/twbs/bootstrap/pull/10951.
outline: 0;
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
// See also https://github.com/twbs/bootstrap/issues/17695
-
- .modal-open & {
- overflow-x: hidden;
- overflow-y: auto;
- }
}
// Shell div to position the modal with bottom padding
.modal-dialog {
position: relative;
@@ -52,10 +52,17 @@
.modal-dialog-centered {
display: flex;
align-items: center;
min-height: calc(100% - (#{$modal-dialog-margin} * 2));
+
+ // Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
+ &::before {
+ display: block; // IE10
+ height: calc(100vh - (#{$modal-dialog-margin} * 2));
+ content: "";
+ }
}
// Actual modal
.modal-content {
position: relative;
@@ -151,9 +158,14 @@
margin: $modal-dialog-margin-y-sm-up auto;
}
.modal-dialog-centered {
min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
+
+ &::before {
+ height: calc(100vh - (#{$modal-dialog-margin-y-sm-up} * 2));
+ }
+
}
.modal-content {
@include box-shadow($modal-content-box-shadow-sm-up);
}