aboutsummaryrefslogtreecommitdiff
path: root/less/modals.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-14 16:46:40 -0800
committerMark Otto <[email protected]>2013-12-14 16:46:40 -0800
commit4c64c1eecdb52d943a50d2c181aeb915a3caed34 (patch)
tree93b556ef583bb6a327cad76804bbdf4c5a4c6f4c /less/modals.less
parent2b56ff04614c4617355d16c14784654e841bcf4d (diff)
parentd79431ca02683c9d1c754201260f66e5dda15614 (diff)
downloadbootstrap-4c64c1eecdb52d943a50d2c181aeb915a3caed34.tar.xz
bootstrap-4c64c1eecdb52d943a50d2c181aeb915a3caed34.zip
Merge branch 'master' into pr/11302
Conflicts: dist/css/bootstrap.css dist/css/bootstrap.min.css
Diffstat (limited to 'less/modals.less')
-rw-r--r--less/modals.less27
1 files changed, 16 insertions, 11 deletions
diff --git a/less/modals.less b/less/modals.less
index 99cf76469..ec1bf55dc 100644
--- a/less/modals.less
+++ b/less/modals.less
@@ -22,7 +22,11 @@
right: 0;
bottom: 0;
left: 0;
- z-index: @zindex-modal-background;
+ z-index: @zindex-modal;
+
+ // 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 {
@@ -35,11 +39,8 @@
// 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
@@ -62,11 +63,11 @@
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
@@ -100,7 +101,7 @@
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 {
@@ -118,15 +119,19 @@
}
// 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;
+ 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; }
+
}