_tooltip.scss 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. border-radius: 2px;
  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-tip {
  87. padding-left: 5px;
  88. }