vendor/twitter/bootstrap/less/modals.less in bootstrap-generators-3.1.1.3 vs vendor/twitter/bootstrap/less/modals.less in bootstrap-generators-3.2.0
- old
+ new
@@ -13,12 +13,11 @@
}
// Container that the modal scrolls within
.modal {
display: none;
- overflow: auto;
- overflow-y: scroll;
+ overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
@@ -29,15 +28,19 @@
// https://github.com/twbs/bootstrap/pull/10951.
outline: 0;
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
- .translate(0, -25%);
+ .translate3d(0, -25%, 0);
.transition-transform(~"0.3s ease-out");
}
- &.in .modal-dialog { .translate(0, 0)}
+ &.in .modal-dialog { .translate3d(0, 0, 0) }
}
+.modal-open .modal {
+ overflow-x: hidden;
+ overflow-y: auto;
+}
// Shell div to position the modal with bottom padding
.modal-dialog {
position: relative;
width: auto;
@@ -52,11 +55,11 @@
border: 1px solid @modal-content-border-color;
border-radius: @border-radius-large;
.box-shadow(0 3px 9px rgba(0,0,0,.5));
background-clip: padding-box;
// Remove focus outline from opened modal
- outline: none;
+ outline: 0;
}
// Modal background
.modal-backdrop {
position: fixed;
@@ -96,12 +99,11 @@
padding: @modal-inner-padding;
}
// Footer (for actions)
.modal-footer {
- margin-top: 15px;
- padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
+ padding: @modal-inner-padding;
text-align: right; // right align buttons
border-top: 1px solid @modal-footer-border-color;
&:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons
@@ -115,9 +117,18 @@
}
// and override it for block buttons as well
.btn-block + .btn-block {
margin-left: 0;
}
+}
+
+// Measure scrollbar width for padding body during modal show/hide
+.modal-scrollbar-measure {
+ position: absolute;
+ top: -9999px;
+ width: 50px;
+ height: 50px;
+ overflow: scroll;
}
// Scale up the modal
@media (min-width: @screen-sm-min) {
// Automatically set modal's width for larger viewports