aboutsummaryrefslogtreecommitdiff
path: root/less/modals.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-15 14:10:48 -0800
committerMark Otto <[email protected]>2013-12-15 14:10:48 -0800
commit122245fe87bbd293a82ffa6b9c37d8b174b3dc0f (patch)
tree35679d94b5787a2ffaf712caa0fab3bf47dd8fa3 /less/modals.less
parent0fcaca86b57bf3a4fa2c8f709e90499c92e0db73 (diff)
parent55f6beb4278979155549e17da6e87a2548ec0b88 (diff)
downloadbootstrap-122245fe87bbd293a82ffa6b9c37d8b174b3dc0f.tar.xz
bootstrap-122245fe87bbd293a82ffa6b9c37d8b174b3dc0f.zip
Merge branch 'master' into pr/11676
Conflicts: less/modals.less
Diffstat (limited to 'less/modals.less')
-rw-r--r--less/modals.less22
1 files changed, 15 insertions, 7 deletions
diff --git a/less/modals.less b/less/modals.less
index bfb80c282..f6ab34769 100644
--- a/less/modals.less
+++ b/less/modals.less
@@ -22,9 +22,13 @@
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%);
@@ -38,7 +42,6 @@
position: relative;
width: auto;
margin: 10px;
- z-index: (@zindex-modal-background + 10);
}
// Actual modal
@@ -61,11 +64,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
@@ -99,7 +102,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 {
@@ -117,8 +120,9 @@
}
// 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;
margin: 30px auto;
@@ -127,4 +131,8 @@
.box-shadow(0 5px 15px rgba(0,0,0,.5));
}
+ // Modal sizes
+ .modal-sm { width: @modal-sm; }
+ .modal-lg { width: @modal-lg; }
+
}