// // Modals // .modal-open - body class for killing the scroll // .modal - container to scroll within // .modal-dialog - positioning shell for the actual modal // .modal-content - actual modal w/ bg and corners and shit // Kill the scroll on the body .modal-open { overflow: hidden; } // Container that the modal scrolls within .modal { display: none; overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; -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; } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } // Shell div to position the modal with bottom padding .modal_dialog { position: relative; width: auto; margin: 10px; } // Actual modal .modal_content { position: relative; background-color: #fff; border: 1px solid rgba(#000,0.15); border-radius: $radius * 2; background-clip: padding-box; // Remove focus outline from opened modal outline: 0; } // Modal background .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: #000; // Fade for backdrop &.fade { opacity: 0; } &.in { opacity: 0.5; } } // Modal header // Top section of the modal w/ title and dismiss .modal_header { padding: 1rem 2rem; background-color: #f0f0f0; margin-bottom: 1rem; @include border_top_radius(($radius * 2) - 1); position: relative; h3 { font-size: 1.6rem; font-weight: normal; margin: 0; color: #333; } .close { position: absolute; top: -9px; right: -9px; color: #fff; background-color: $darkestGray; border-radius: 50%; width: 24px; height: 24px; text-decoration: none; text-align: center; font-size: 20px; line-height: 24px; &:hover { background-color: #4d4d4d; } } } // Title text within header .modal_title { margin: 0; line-height: 20px; } // Modal body // Where all modal content resides (sibling of .modal_header and .modal-footer) .modal_body { position: relative; padding: 0 2rem 1.5rem; > .loading { font-size: 2rem; text-align: center; } } // Footer (for actions) .modal_footer { background-color: $lighterGray; padding: 1rem 2rem; text-align: right; // right align buttons @include border_bottom_radius($radius * 2); // 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 } // but override that for button groups .btn-group .btn + .btn { margin-left: -1px; } // and override it for block buttons as well .btn-block + .btn-block { margin-left: 0; } } .modal_confirm { .modal_header { background-color: $errorColor; h3 { color: #fff; } } .modal_body p { font-size: 1.1rem; margin-bottom: 0; } } // Measure scrollbar width for padding body during modal show/hide .modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } // Scale up the modal @media screen and (min-width: 768px) { .modal_dialog { margin: 30px auto; width: 42rem; } }