static/less/tooltip.less
author stetrabby <info@trabucchi.de>
Fri, 20 Dec 2013 22:30:44 +0100
changeset 53 3416f82943ea
permissions -rwxr-xr-x
less initial added
info@53
     1
//
info@53
     2
// Tooltips
info@53
     3
// --------------------------------------------------
info@53
     4
info@53
     5
info@53
     6
// Base class
info@53
     7
.tooltip {
info@53
     8
  position: absolute;
info@53
     9
  z-index: @zindex-tooltip;
info@53
    10
  display: block;
info@53
    11
  visibility: visible;
info@53
    12
  font-size: @font-size-small;
info@53
    13
  line-height: 1.4;
info@53
    14
  .opacity(0);
info@53
    15
info@53
    16
  &.in     { .opacity(.9); }
info@53
    17
  &.top    { margin-top:  -3px; padding: @tooltip-arrow-width 0; }
info@53
    18
  &.right  { margin-left:  3px; padding: 0 @tooltip-arrow-width; }
info@53
    19
  &.bottom { margin-top:   3px; padding: @tooltip-arrow-width 0; }
info@53
    20
  &.left   { margin-left: -3px; padding: 0 @tooltip-arrow-width; }
info@53
    21
}
info@53
    22
info@53
    23
// Wrapper for the tooltip content
info@53
    24
.tooltip-inner {
info@53
    25
  max-width: @tooltip-max-width;
info@53
    26
  padding: 3px 8px;
info@53
    27
  color: @tooltip-color;
info@53
    28
  text-align: center;
info@53
    29
  text-decoration: none;
info@53
    30
  background-color: @tooltip-bg;
info@53
    31
  border-radius: @border-radius-base;
info@53
    32
}
info@53
    33
info@53
    34
// Arrows
info@53
    35
.tooltip-arrow {
info@53
    36
  position: absolute;
info@53
    37
  width: 0;
info@53
    38
  height: 0;
info@53
    39
  border-color: transparent;
info@53
    40
  border-style: solid;
info@53
    41
}
info@53
    42
.tooltip {
info@53
    43
  &.top .tooltip-arrow {
info@53
    44
    bottom: 0;
info@53
    45
    left: 50%;
info@53
    46
    margin-left: -@tooltip-arrow-width;
info@53
    47
    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
info@53
    48
    border-top-color: @tooltip-arrow-color;
info@53
    49
  }
info@53
    50
  &.top-left .tooltip-arrow {
info@53
    51
    bottom: 0;
info@53
    52
    left: @tooltip-arrow-width;
info@53
    53
    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
info@53
    54
    border-top-color: @tooltip-arrow-color;
info@53
    55
  }
info@53
    56
  &.top-right .tooltip-arrow {
info@53
    57
    bottom: 0;
info@53
    58
    right: @tooltip-arrow-width;
info@53
    59
    border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
info@53
    60
    border-top-color: @tooltip-arrow-color;
info@53
    61
  }
info@53
    62
  &.right .tooltip-arrow {
info@53
    63
    top: 50%;
info@53
    64
    left: 0;
info@53
    65
    margin-top: -@tooltip-arrow-width;
info@53
    66
    border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
info@53
    67
    border-right-color: @tooltip-arrow-color;
info@53
    68
  }
info@53
    69
  &.left .tooltip-arrow {
info@53
    70
    top: 50%;
info@53
    71
    right: 0;
info@53
    72
    margin-top: -@tooltip-arrow-width;
info@53
    73
    border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
info@53
    74
    border-left-color: @tooltip-arrow-color;
info@53
    75
  }
info@53
    76
  &.bottom .tooltip-arrow {
info@53
    77
    top: 0;
info@53
    78
    left: 50%;
info@53
    79
    margin-left: -@tooltip-arrow-width;
info@53
    80
    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
info@53
    81
    border-bottom-color: @tooltip-arrow-color;
info@53
    82
  }
info@53
    83
  &.bottom-left .tooltip-arrow {
info@53
    84
    top: 0;
info@53
    85
    left: @tooltip-arrow-width;
info@53
    86
    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
info@53
    87
    border-bottom-color: @tooltip-arrow-color;
info@53
    88
  }
info@53
    89
  &.bottom-right .tooltip-arrow {
info@53
    90
    top: 0;
info@53
    91
    right: @tooltip-arrow-width;
info@53
    92
    border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
info@53
    93
    border-bottom-color: @tooltip-arrow-color;
info@53
    94
  }
info@53
    95
}
Impressum Datenschutzerklärung