/** * @copyright 2010-2013, The Titon Project * @license http://opensource.org/licenses/bsd-license.php * @link http://titon.io */ @import "../common"; $tooltip-arrow-width-double: ($tooltip-arrow-width * 2); .#{$vendor-prefix}tooltip { position: absolute; top: 0; left: 0; border: none; margin: $margin; padding: $small-padding; z-index: $tooltip-zindex; max-width: 200px; visibility: hidden; background: #000; color: #fff; @include box-sizing(content-box); // Required or else MooTools position() is off &.center-left .#{$vendor-prefix}tooltip-arrow, &.center-right .#{$vendor-prefix}tooltip-arrow { top: 50%; margin-top: -#{$tooltip-arrow-width}px; } &.center-left .#{$vendor-prefix}tooltip-arrow { border-left-color: #000; right: -#{$tooltip-arrow-width-double}px; } &.center-right .#{$vendor-prefix}tooltip-arrow { border-right-color: #000; left: -#{$tooltip-arrow-width-double}px; } &.top-center .#{$vendor-prefix}tooltip-arrow, &.bottom-center .#{$vendor-prefix}tooltip-arrow { left: 50%; margin-left: -#{$tooltip-arrow-width}px; } &.top-center .#{$vendor-prefix}tooltip-arrow { border-top-color: #000; bottom: -#{$tooltip-arrow-width-double}px; } &.bottom-center .#{$vendor-prefix}tooltip-arrow { border-bottom-color: #000; top: -#{$tooltip-arrow-width-double}px; } } .#{$vendor-prefix}tooltip-arrow, .#{$vendor-prefix}popover-arrow { width: 0; height: 0; border: #{$tooltip-arrow-width}px solid transparent; position: absolute; &:after { content: ""; border: #{($tooltip-arrow-width - 2)}px solid transparent; position: absolute; } } //-------------------- Animations --------------------// .#{$vendor-prefix}tooltip, .#{$vendor-prefix}popover { @if index($popover-tooltip-animation, "fade") { &.fade { opacity: 0; @include transition(opacity 0.5s); } } @if index($popover-tooltip-animation, "from-above") { &.from-above { @include transition(transform $tooltip-transition); @include transform(scale(1.2)); &.show { @include transform(scale(1)); } } } @if index($popover-tooltip-animation, "from-below") { &.from-below { @include transition(transform $tooltip-transition); @include transform(scale(0.8)); &.show { @include transform(scale(1)); } } } @if index($popover-tooltip-animation, "flip-rotate") { &.flip-rotate { @include transition(transform $tooltip-transition); @include transform(rotate(-15deg)); &.show { @include transform(rotate(0deg)); } } } }