tooltip.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //
  2. // Tooltips
  3. // --------------------------------------------------
  4. // Base class
  5. .tooltip {
  6. position: absolute;
  7. z-index: $zindexTooltip;
  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. @include border-radius($baseBorderRadius);
  28. }
  29. // Arrows
  30. .tooltip-arrow {
  31. position: absolute;
  32. width: 0;
  33. height: 0;
  34. border-color: transparent;
  35. border-style: solid;
  36. }
  37. .tooltip {
  38. &.top .tooltip-arrow {
  39. bottom: 0;
  40. left: 50%;
  41. margin-left: -$tooltipArrowWidth;
  42. border-width: $tooltipArrowWidth $tooltipArrowWidth 0;
  43. border-top-color: $tooltipArrowColor;
  44. }
  45. &.right .tooltip-arrow {
  46. top: 50%;
  47. left: 0;
  48. margin-top: -$tooltipArrowWidth;
  49. border-width: $tooltipArrowWidth $tooltipArrowWidth $tooltipArrowWidth 0;
  50. border-right-color: $tooltipArrowColor;
  51. }
  52. &.left .tooltip-arrow {
  53. top: 50%;
  54. right: 0;
  55. margin-top: -$tooltipArrowWidth;
  56. border-width: $tooltipArrowWidth 0 $tooltipArrowWidth $tooltipArrowWidth;
  57. border-left-color: $tooltipArrowColor;
  58. }
  59. &.bottom .tooltip-arrow {
  60. top: 0;
  61. left: 50%;
  62. margin-left: -$tooltipArrowWidth;
  63. border-width: 0 $tooltipArrowWidth $tooltipArrowWidth;
  64. border-bottom-color: $tooltipArrowColor;
  65. }
  66. }
  67. .grafana-tooltip {
  68. position : absolute;
  69. top: -1000;
  70. left: 0;
  71. color: $tooltipColor;
  72. padding: 10px;
  73. font-size: 11pt;
  74. font-weight : 200;
  75. background-color: $tooltipBackground;
  76. border-radius: 5px;
  77. z-index: 9999;
  78. max-width: 800px;
  79. max-height: 600px;
  80. overflow: hidden;
  81. line-height: 14px;
  82. a {
  83. color: $tooltipLinkColor;
  84. }
  85. }
  86. .grafana-tooltip hr {
  87. padding: 2px;
  88. color: #c8c8c8;
  89. margin: 0px;
  90. border-bottom: 0px solid #c8c8c8;
  91. }
  92. .grafana-tip {
  93. padding-left: 5px;
  94. }