_tooltip.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // Tooltips
  3. // --------------------------------------------------
  4. // Base class
  5. .tooltip {
  6. position: absolute;
  7. z-index: $zindex-tooltip;
  8. display: block;
  9. visibility: visible;
  10. font-size: 11px;
  11. line-height: 1.4;
  12. @include opacity(0);
  13. &.in {
  14. @include opacity(100);
  15. }
  16. &.top {
  17. margin-top: -3px;
  18. padding: 5px 0;
  19. }
  20. &.right {
  21. margin-left: 3px;
  22. padding: 0 5px;
  23. }
  24. &.bottom {
  25. margin-top: 3px;
  26. padding: 5px 0;
  27. }
  28. &.left {
  29. margin-left: -3px;
  30. padding: 0 5px;
  31. }
  32. }
  33. // Wrapper for the tooltip content
  34. .tooltip-inner {
  35. max-width: 400px;
  36. padding: 8px;
  37. color: $tooltipColor;
  38. text-align: center;
  39. text-decoration: none;
  40. background-color: $tooltipBackground;
  41. border-radius: 2px;
  42. }
  43. // Arrows
  44. .tooltip-arrow {
  45. position: absolute;
  46. width: 0;
  47. height: 0;
  48. border-color: transparent;
  49. border-style: solid;
  50. }
  51. .tooltip {
  52. &.top .tooltip-arrow {
  53. bottom: 0;
  54. left: 50%;
  55. margin-left: -$tooltipArrowWidth;
  56. border-width: $tooltipArrowWidth $tooltipArrowWidth 0;
  57. border-top-color: $tooltipArrowColor;
  58. }
  59. &.right .tooltip-arrow {
  60. top: 50%;
  61. left: 0;
  62. margin-top: -$tooltipArrowWidth;
  63. border-width: $tooltipArrowWidth $tooltipArrowWidth $tooltipArrowWidth 0;
  64. border-right-color: $tooltipArrowColor;
  65. }
  66. &.left .tooltip-arrow {
  67. top: 50%;
  68. right: 0;
  69. margin-top: -$tooltipArrowWidth;
  70. border-width: $tooltipArrowWidth 0 $tooltipArrowWidth $tooltipArrowWidth;
  71. border-left-color: $tooltipArrowColor;
  72. }
  73. &.bottom .tooltip-arrow {
  74. top: 0;
  75. left: 50%;
  76. margin-left: -$tooltipArrowWidth;
  77. border-width: 0 $tooltipArrowWidth $tooltipArrowWidth;
  78. border-bottom-color: $tooltipArrowColor;
  79. }
  80. }
  81. .grafana-tooltip {
  82. position: absolute;
  83. top: -1000;
  84. left: 0;
  85. color: $tooltipColor;
  86. padding: 10px;
  87. font-size: 11pt;
  88. font-weight: 200;
  89. background-color: $tooltipBackground;
  90. border-radius: 5px;
  91. z-index: 9999;
  92. max-width: 800px;
  93. max-height: 600px;
  94. overflow: hidden;
  95. line-height: 14px;
  96. a {
  97. color: $tooltipLinkColor;
  98. }
  99. }
  100. .grafana-tip {
  101. padding-left: 5px;
  102. }