|
|
e8ec7a |
//
|
|
|
e8ec7a |
// Modals
|
|
|
e8ec7a |
// --------------------------------------------------
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// .modal-open - body class for killing the scroll
|
|
|
e8ec7a |
// .modal - container to scroll within
|
|
|
e8ec7a |
// .modal-dialog - positioning shell for the actual modal
|
|
|
e8ec7a |
// .modal-content - actual modal w/ bg and corners and shit
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Kill the scroll on the body
|
|
|
e8ec7a |
.modal-open {
|
|
|
e8ec7a |
overflow: hidden;
|
|
|
e8ec7a |
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Account for hiding of scrollbar
|
|
|
e8ec7a |
|
|
|
e8ec7a |
.navbar-fixed-top,
|
|
|
e8ec7a |
.navbar-fixed-bottom {
|
|
|
e8ec7a |
margin-right: 15px
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
// [converter] extracted body& to body.modal-open
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
body.modal-open {
|
|
|
e8ec7a |
margin-right: 15px
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Container that the modal scrolls within
|
|
|
e8ec7a |
.modal {
|
|
|
e8ec7a |
display: none;
|
|
|
e8ec7a |
overflow: auto;
|
|
|
e8ec7a |
overflow-y: scroll;
|
|
|
e8ec7a |
position: fixed;
|
|
|
e8ec7a |
top: 0;
|
|
|
e8ec7a |
right: 0;
|
|
|
e8ec7a |
bottom: 0;
|
|
|
e8ec7a |
left: 0;
|
|
|
e8ec7a |
z-index: $zindex-modal-background;
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// When fading in the modal, animate it to slide down
|
|
|
e8ec7a |
&.fade .modal-dialog {
|
|
|
e8ec7a |
@include translate(0, -25%);
|
|
|
e8ec7a |
@include transition-transform(0.3s ease-out);
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
&.in .modal-dialog { @include translate(0, 0)}
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Shell div to position the modal with bottom padding
|
|
|
e8ec7a |
.modal-dialog {
|
|
|
e8ec7a |
margin-left: auto;
|
|
|
e8ec7a |
margin-right: auto;
|
|
|
e8ec7a |
width: auto;
|
|
|
e8ec7a |
padding: 10px;
|
|
|
e8ec7a |
z-index: ($zindex-modal-background + 10);
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Actual modal
|
|
|
e8ec7a |
.modal-content {
|
|
|
e8ec7a |
position: relative;
|
|
|
e8ec7a |
background-color: $modal-content-bg;
|
|
|
e8ec7a |
border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
|
|
|
e8ec7a |
border: 1px solid $modal-content-border-color;
|
|
|
e8ec7a |
border-radius: $border-radius-large;
|
|
|
e8ec7a |
@include box-shadow(0 3px 9px rgba(0,0,0,.5));
|
|
|
e8ec7a |
background-clip: padding-box;
|
|
|
e8ec7a |
// Remove focus outline from opened modal
|
|
|
e8ec7a |
outline: none;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Modal background
|
|
|
e8ec7a |
.modal-backdrop {
|
|
|
e8ec7a |
position: fixed;
|
|
|
e8ec7a |
top: 0;
|
|
|
e8ec7a |
right: 0;
|
|
|
e8ec7a |
bottom: 0;
|
|
|
e8ec7a |
left: 0;
|
|
|
e8ec7a |
z-index: ($zindex-modal-background - 10);
|
|
|
e8ec7a |
background-color: $modal-backdrop-bg;
|
|
|
e8ec7a |
// Fade for backdrop
|
|
|
e8ec7a |
&.fade { @include opacity(0); }
|
|
|
e8ec7a |
&.in { @include opacity(.5); }
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Modal header
|
|
|
e8ec7a |
// Top section of the modal w/ title and dismiss
|
|
|
e8ec7a |
.modal-header {
|
|
|
e8ec7a |
padding: $modal-title-padding;
|
|
|
e8ec7a |
border-bottom: 1px solid $modal-header-border-color;
|
|
|
e8ec7a |
min-height: ($modal-title-padding + $modal-title-line-height);
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
// Close icon
|
|
|
e8ec7a |
.modal-header .close {
|
|
|
e8ec7a |
margin-top: -2px;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Title text within header
|
|
|
e8ec7a |
.modal-title {
|
|
|
e8ec7a |
margin: 0;
|
|
|
e8ec7a |
line-height: $modal-title-line-height;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Modal body
|
|
|
e8ec7a |
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
|
|
e8ec7a |
.modal-body {
|
|
|
e8ec7a |
position: relative;
|
|
|
e8ec7a |
padding: $modal-inner-padding;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Footer (for actions)
|
|
|
e8ec7a |
.modal-footer {
|
|
|
e8ec7a |
margin-top: 15px;
|
|
|
e8ec7a |
padding: ($modal-inner-padding - 1) $modal-inner-padding $modal-inner-padding;
|
|
|
e8ec7a |
text-align: right; // right align buttons
|
|
|
e8ec7a |
border-top: 1px solid $modal-footer-border-color;
|
|
|
e8ec7a |
@include clearfix(); // clear it in case folks use .pull-* classes on buttons
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Properly space out buttons
|
|
|
e8ec7a |
.btn + .btn {
|
|
|
e8ec7a |
margin-left: 5px;
|
|
|
e8ec7a |
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
// but override that for button groups
|
|
|
e8ec7a |
.btn-group .btn + .btn {
|
|
|
e8ec7a |
margin-left: -1px;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
// and override it for block buttons as well
|
|
|
e8ec7a |
.btn-block + .btn-block {
|
|
|
e8ec7a |
margin-left: 0;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
// Scale up the modal
|
|
|
e8ec7a |
@media screen and (min-width: $screen-tablet) {
|
|
|
e8ec7a |
|
|
|
e8ec7a |
.modal-dialog {
|
|
|
e8ec7a |
left: 50%;
|
|
|
e8ec7a |
right: auto;
|
|
|
e8ec7a |
width: 600px;
|
|
|
e8ec7a |
padding-top: 30px;
|
|
|
e8ec7a |
padding-bottom: 30px;
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
.modal-content {
|
|
|
e8ec7a |
@include box-shadow(0 5px 15px rgba(0,0,0,.5));
|
|
|
e8ec7a |
}
|
|
|
e8ec7a |
|
|
|
e8ec7a |
}
|