/** * @copyright 2010-2013, The Titon Project * @license http://opensource.org/licenses/bsd-license.php * @link http://titon.io */ @import "../common"; .#{$vendor-prefix}modal { position: fixed; top: 50%; left: 50%; width: 50%; height: auto; margin: 0; padding: 0; z-index: 610; // higher than blackout max-width: 700px; min-width: 350px; visibility: hidden; backface-visibility: hidden; @include transform(translateX(-50%) translateY(-50%)); &.#{$state-is-prefix}loading { .#{$vendor-prefix}modal-close { display: none; } } &.#{$state-is-prefix}draggable { .#{$vendor-prefix}modal-inner { cursor: default; } .#{$vendor-prefix}modal-head { cursor: move; } } } .#{$vendor-prefix}modal-close { position: absolute; top: $padding; right: $padding; line-height: 1rem; opacity: $default-opacity; padding: 5px; &:hover { opacity: 1; } } .#{$vendor-prefix}modal-inner { position: relative; margin: 0 auto; background: $gray; } .#{$vendor-prefix}modal-head, .#{$vendor-prefix}modal-body, .#{$vendor-prefix}modal-foot, .#{$vendor-prefix}modal-loading, .#{$vendor-prefix}modal-error { padding: $padding; } // Remove margins from text elements .#{$vendor-prefix}modal-body { @include content-spacing; } //-------------------- Modifiers --------------------// .#{$vendor-prefix}modal.#{$state-is-prefix}fullscreen { top: 0; left: 0; margin: 0; width: 100%; max-width: 100%; max-height: auto; border-radius: 0; @include transform(translateX(0) translateY(0)); } //-------------------- Animations --------------------// .#{$vendor-prefix}modal { &.from-above, &.from-below, &.slide-in-top, &.slide-in-bottom, &.slide-in-left, &.slide-in-right, &.flip, &.flip-vert { .#{$vendor-prefix}modal-handle { opacity: 0; @include transition(all $modal-transition); } &.show .#{$vendor-prefix}modal-handle { opacity: 1; } } &.fade { opacity: 0; @include transition(opacity $modal-transition); } &.from-above { .#{$vendor-prefix}modal-handle { @include transform(scale(1.3)); } &.show .#{$vendor-prefix}modal-handle { @include transform(scale(1)); } } &.from-below { .#{$vendor-prefix}modal-handle { @include transform(scale(0.7)); } &.show .#{$vendor-prefix}modal-handle { @include transform(scale(1)); } } &.slide-in-top { .#{$vendor-prefix}modal-handle { @include transform(translateY(-50%)); } &.show .#{$vendor-prefix}modal-handle { @include transform(translateY(0)); } } &.slide-in-bottom { .#{$vendor-prefix}modal-handle { @include transform(translateY(50%)); } &.show .#{$vendor-prefix}modal-handle { @include transform(translateY(0)); } } &.slide-in-left { .#{$vendor-prefix}modal-handle { @include transition(all $modal-transition cubic-bezier(0.25, 0.5, 0.5, 0.9)); @include transform(translateX(-50%)); } &.show .#{$vendor-prefix}modal-handle { @include transform(translateX(0)); } } &.slide-in-right { .#{$vendor-prefix}modal-handle { @include transition(all $modal-transition cubic-bezier(0.25, 0.5, 0.5, 0.9)); @include transform(translateX(50%)); } &.show .#{$vendor-prefix}modal-handle { @include transform(translateX(0)); } } &.sticky-top { top: -100%; opacity: 0; @include transition(all $modal-transition); @include transform(translateX(-50%)); // reset to x &.show { top: 0; opacity: 1; } } &.sticky-bottom { top: auto; bottom: -100%; opacity: 0; @include transition(all $modal-transition); @include transform(translateX(-50%)); // reset to x &.show { bottom: 0; opacity: 1; } } &.sticky-left { left: -100%; opacity: 0; @include transition(all $modal-transition); @include transform(translate(0, -50%)); &.show { left: 0; opacity: 1; } } &.sticky-right { left: auto; right: -100%; opacity: 0; @include transition(all $modal-transition); @include transform(translate(0, -50%)); &.show { right: 0; opacity: 1; } } &.flip { @include perspective(1300px); .#{$vendor-prefix}modal-handle { @include transform-style(preserve-3d); @include transform(rotateY(-70deg)); } &.show .#{$vendor-prefix}modal-handle { @include transform(rotateY(0deg)); } } &.flip-vert { @include perspective(1300px); .#{$vendor-prefix}modal-handle { @include transform-style(preserve-3d); @include transform(rotateX(-70deg)); } &.show .#{$vendor-prefix}modal-handle { @include transform(rotateX(0deg)); } } }