vendor/twitter/bootstrap/less/modals.less in bootstrap-generators-3.0.2.2 vs vendor/twitter/bootstrap/less/modals.less in bootstrap-generators-3.1.0
- old
+ new
@@ -20,12 +20,17 @@
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
- z-index: @zindex-modal-background;
+ z-index: @zindex-modal;
+ -webkit-overflow-scrolling: touch;
+ // Prevent Chrome on Windows from adding a focus outline. For details, see
+ // 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%);
.transition-transform(~"0.3s ease-out");
}
@@ -33,15 +38,12 @@
}
// Shell div to position the modal with bottom padding
.modal-dialog {
position: relative;
- margin-left: auto;
- margin-right: auto;
width: auto;
- padding: 10px;
- z-index: (@zindex-modal-background + 10);
+ margin: 10px;
}
// Actual modal
.modal-content {
position: relative;
@@ -60,15 +62,15 @@
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
- z-index: (@zindex-modal-background - 10);
+ z-index: @zindex-modal-background;
background-color: @modal-backdrop-bg;
// Fade for backdrop
&.fade { .opacity(0); }
- &.in { .opacity(.5); }
+ &.in { .opacity(@modal-backdrop-opacity); }
}
// Modal header
// Top section of the modal w/ title and dismiss
.modal-header {
@@ -98,11 +100,11 @@
.modal-footer {
margin-top: 15px;
padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
text-align: right; // right align buttons
border-top: 1px solid @modal-footer-border-color;
- .clearfix(); // clear it in case folks use .pull-* classes on buttons
+ &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons
.btn + .btn {
margin-left: 5px;
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
@@ -116,17 +118,21 @@
margin-left: 0;
}
}
// Scale up the modal
-@media screen and (min-width: @screen-sm-min) {
+@media (min-width: @screen-sm-min) {
+ // Automatically set modal's width for larger viewports
.modal-dialog {
- width: 600px;
- padding-top: 30px;
- padding-bottom: 30px;
+ width: @modal-md;
+ margin: 30px auto;
}
.modal-content {
.box-shadow(0 5px 15px rgba(0,0,0,.5));
}
+
+ // Modal sizes
+ .modal-sm { width: @modal-sm; }
+ .modal-lg { width: @modal-lg; }
}