You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Tooltip.css 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2021 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. .tooltip {
  21. position: absolute;
  22. z-index: var(--tooltipZIndex);
  23. display: block;
  24. height: auto;
  25. box-sizing: border-box;
  26. font-size: var(--baseFontSize);
  27. font-weight: 300;
  28. line-height: 1.5;
  29. animation: fadeIn 0.3s forwards;
  30. }
  31. .tooltip.top {
  32. padding: 5px 0;
  33. margin-top: -3px;
  34. }
  35. .tooltip.right {
  36. padding: 0 5px;
  37. margin-left: 3px;
  38. }
  39. .tooltip.bottom {
  40. padding: 5px 0;
  41. margin-top: 3px;
  42. }
  43. .tooltip.left {
  44. padding: 0 5px;
  45. margin-left: -3px;
  46. }
  47. .tooltip-inner {
  48. max-width: 300px;
  49. text-align: left;
  50. text-decoration: none;
  51. border-radius: 4px;
  52. overflow: hidden;
  53. word-break: break-word;
  54. }
  55. .tooltip-inner {
  56. padding: 12px 17px;
  57. color: #fff;
  58. background-color: #475760;
  59. letter-spacing: 0.04em;
  60. }
  61. .tooltip-inner .alert {
  62. margin-bottom: 5px;
  63. border-radius: 4px;
  64. }
  65. .tooltip-inner a {
  66. border-bottom-color: #8da6b3;
  67. color: #a5d0ea;
  68. }
  69. .tooltip-inner hr {
  70. background-color: #5d6d75;
  71. }
  72. .tooltip-arrow {
  73. position: absolute;
  74. width: 0;
  75. height: 0;
  76. border: solid transparent;
  77. }
  78. .tooltip.top .tooltip-arrow {
  79. bottom: 0;
  80. left: 50%;
  81. border-width: 5px 5px 0;
  82. transform: translateX(-5px);
  83. border-top-color: #475760;
  84. }
  85. .tooltip.right .tooltip-arrow {
  86. top: 50%;
  87. left: 0;
  88. transform: translateY(-5px);
  89. border-width: 5px 5px 5px 0;
  90. border-right-color: #475760;
  91. }
  92. .tooltip.left .tooltip-arrow {
  93. top: 50%;
  94. right: 0;
  95. transform: translateY(-5px);
  96. border-width: 5px 0 5px 5px;
  97. border-left-color: #475760;
  98. }
  99. .tooltip.bottom .tooltip-arrow {
  100. top: 0;
  101. left: 50%;
  102. transform: translateX(-5px);
  103. border-width: 0 5px 5px;
  104. border-bottom-color: #475760;
  105. }
  106. /* Workaround for react issue with onMouseLeave in disabled buttons: https://github.com/facebook/react/issues/4251 */
  107. .tooltip button[disabled] {
  108. pointer-events: none;
  109. }
  110. @keyframes fadeIn {
  111. from {
  112. opacity: 0;
  113. }
  114. to {
  115. opacity: 1;
  116. }
  117. }