_tooltip.scss 2.1 KB

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