// // Modals // -------------------------------------------------- // Background .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: @zindexModalBackdrop; background-color: @black; // Fade for backdrop &.fade { opacity: 0; } } .modal-backdrop, .modal-backdrop.fade.in { .opacity(.48); } // Base modal .modal { font-family: @font-family; position: fixed; top: 10%; left: 50%; z-index: @zindexModal; width: 560px; margin-left: -280px; background-color: @white; border: none; .border-radius(4px); .box-shadow(e('0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)')); .background-clip(padding-box); // Remove focus outline from opened modal outline: none; strong { font-weight: 500; } &.fade { .transition(e('opacity .3s linear, top .3s ease-out')); top: -25%; } &.fade.in { top: 30%; .transform(translateY(-30%) translate3d(0,0,0)); } .modal-footer { .btn { &:extend(.md-button); margin: 0; &:not([disabled]):not(.disabled) { &:hover { color: @foreground-1; background-color: @background-500; } &:active { &, &:hover { background-color: @background-600; outline: none; } .box-shadow(none); } } &.btn-primary { &[disabled], &.disabled { color: @foreground-3; cursor: default; background-color: @foreground-4; } &:not([disabled]):not(.disabled) { color: @primary-contrast; background-color: @primary-color; .md-shadow-bottom-z-1(); &:hover { background-color: @primary-600; } &:active { background-color: @primary-600; .md-shadow-bottom-z-2(); } } padding: @button-raised-padding; } } } } .modal-header { padding: 24px 24px 0; /*border-bottom: 1px solid #eee;*/ // Close icon .close { margin-top: 2px; } // Heading h3, .modal-title { .md-title(); margin: 0; line-height: 30px; } &[theme]{ padding: 18px 24px; h3 { color: #fff; } } &[theme="md-primary"]{ background-color: @primary-color; } &[theme="md-secondary"]{ background-color: @secondary-color; } &[theme="md-danger"]{ background-color: @danger-color; } &[theme="md-success"]{ background-color: @success-color; } &[theme="md-warning"]{ background-color: @warn-color; } } // Body (where all modal content resides) .modal-body { position: relative; overflow-y: auto; max-height: ~"calc(100vh - 138px)"; padding: 24px; > .md-table-editable { margin: -24px; .md-table-editable-actions { border-top: none; > .md-padding { padding: 8px; } } } > md-tabs { margin: 0 -24px -24px; } fieldset { padding-left: 0; padding-right: 0; } } // Remove bottom margin if need be .modal-form { margin-bottom: 0; } // Footer (for actions) .modal-footer { padding: 8px; margin-bottom: 0; text-align: right; // right align buttons background-color: transparent; border-top: none; .border-radius(0 0 4px 4px); .box-shadow(inset 0 1px 0 @white); .clearfix(); // clear it in case folks use .pull-* classes on buttons // 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-footer-fixed { background-color: #fff; border-top: 1px solid @background-100; > md-alert { margin-top: -15px; margin-left: -15px; margin-right: -15px; margin-bottom: 15px; } } } .modal-static { position: static; margin-top: 0; margin-left: 0; width: 100%; } .modal-footer-fixed { position: fixed; bottom: 0; z-index: 10000; left: 0; right: 0; }