// // 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; background-clip: padding-box; // Remove focus outline from opened modal outline: 0; box-shadow: 0 1px 3px rgba(#000,0.18); animation: modal_show 0.25s ease-out; } @keyframes modal_show { 0% { opacity: 0; transform: scale(0.93); } 100% { opacity: 1; transform: scale(1); } } // Modal background .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: #000; opacity: 0.5; animation: fade_half 170ms ease-in; } @keyframes fade_half { 0% { opacity: 0; } 100% { 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; position: relative; padding: 0.5rem 1.75rem; h3 { font-size: 1.35rem; font-weight: 600; margin: 0; color: #444; line-height: 2rem; } .close { float: right; color: rgba(#000,0.6); text-decoration: none; text-align: right; font-size: 2rem; font-weight: 300; line-height: 2rem; width: 2rem; &:hover { color: rgba(#000,0.75); } } } // 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; } } .close { color: rgba(#fff,0.8); &:hover { color: rgba(#fff,0.92); } } .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; } }