3 // --------------------------------------------------
5 // .modal-open - body class for killing the scroll
6 // .modal - container to scroll within
7 // .modal-dialog - positioning shell for the actual modal
8 // .modal-content - actual modal w/ bg and corners and shit
10 // Kill the scroll on the body
15 // Container that the modal scrolls within
24 z-index: $zindex-modal;
25 -webkit-overflow-scrolling: touch;
27 // Prevent Chrome on Windows from adding a focus outline. For details, see
28 // https://github.com/twbs/bootstrap/pull/10951.
31 // When fading in the modal, animate it to slide down
32 &.fade .modal-dialog {
33 @include translate(0, -25%);
34 @include transition-transform(0.3s ease-out);
36 &.in .modal-dialog { @include translate(0, 0) }
43 // Shell div to position the modal with bottom padding
53 background-color: $modal-content-bg;
54 border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
55 border: 1px solid $modal-content-border-color;
56 border-radius: $border-radius-large;
57 @include box-shadow(0 3px 9px rgba(0,0,0,.5));
58 background-clip: padding-box;
59 // Remove focus outline from opened modal
70 z-index: $zindex-modal-background;
71 background-color: $modal-backdrop-bg;
73 &.fade { @include opacity(0); }
74 &.in { @include opacity($modal-backdrop-opacity); }
78 // Top section of the modal w/ title and dismiss
80 padding: $modal-title-padding;
81 border-bottom: 1px solid $modal-header-border-color;
85 .modal-header .close {
89 // Title text within header
92 line-height: $modal-title-line-height;
96 // Where all modal content resides (sibling of .modal-header and .modal-footer)
99 padding: $modal-inner-padding;
102 // Footer (for actions)
104 padding: $modal-inner-padding;
105 text-align: right; // right align buttons
106 border-top: 1px solid $modal-footer-border-color;
107 @include clearfix; // clear it in case folks use .pull-* classes on buttons
109 // Properly space out buttons
112 margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
114 // but override that for button groups
115 .btn-group .btn + .btn {
118 // and override it for block buttons as well
119 .btn-block + .btn-block {
124 // Measure scrollbar width for padding body during modal show/hide
125 .modal-scrollbar-measure {
133 // Scale up the modal
134 @media (min-width: $screen-sm-min) {
135 // Automatically set modal's width for larger viewports
141 @include box-shadow(0 5px 15px rgba(0,0,0,.5));
145 .modal-sm { width: $modal-sm; }
148 @media (min-width: $screen-md-min) {
149 .modal-lg { width: $modal-lg; }