aboutsummaryrefslogtreecommitdiff
path: root/less/modals.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-14 16:29:47 -0800
committerMark Otto <[email protected]>2013-12-14 16:29:47 -0800
commit323a40cc53dabf0561c588c8f8ccd690c5bb0a03 (patch)
tree0f4ab3c35f65a6f88a8b4a8a28001650cdf4ae7a /less/modals.less
parent89e0f1669f2b4166051affa4eec819475660ed72 (diff)
parent83c60ef3eec234b3dac94c841fd1f13f94aab36f (diff)
downloadbootstrap-323a40cc53dabf0561c588c8f8ccd690c5bb0a03.tar.xz
bootstrap-323a40cc53dabf0561c588c8f8ccd690c5bb0a03.zip
Merge branch 'master' into pr/11162
Conflicts: less/modals.less
Diffstat (limited to 'less/modals.less')
-rw-r--r--less/modals.less35
1 files changed, 17 insertions, 18 deletions
diff --git a/less/modals.less b/less/modals.less
index accd4a948..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 {
@@ -34,18 +38,9 @@
// Shell div to position the modal with bottom padding
.modal-dialog {
- margin-left: auto;
- margin-right: auto;
+ position: relative;
width: auto;
- padding: 10px;
- z-index: (@zindex-modal-background + 10);
-
- &.modal-lg {
- width: @modal-lg;
- }
- &.modal-sm {
- width: @modal-sm;
- }
+ margin: 10px;
}
// Actual modal
@@ -68,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
@@ -106,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 {
@@ -124,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; }
+
}