1
0

tooltip.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /**
  2. * @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>
  3. * @copyright Copyright (c) 2016, Robin Appelman <robin@icewind.nl>
  4. * @copyright Copyright (c) 2016, Jan-Christoph Borchardt <hey@jancborchardt.net>
  5. * @copyright Copyright (c) 2016, Erik Pellikka <erik@pellikka.org>
  6. * @copyright Copyright (c) 2015, Vincent Petry <pvince81@owncloud.com>
  7. *
  8. * Bootstrap v3.3.5 (http://getbootstrap.com)
  9. * Copyright 2011-2015 Twitter, Inc.
  10. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  11. */
  12. .tooltip {
  13. position: absolute;
  14. display: block;
  15. font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
  16. font-style: normal;
  17. font-weight: 400;
  18. letter-spacing: normal;
  19. line-break: auto;
  20. line-height: 1.6;
  21. text-align: left;
  22. text-align: start;
  23. text-decoration: none;
  24. text-shadow: none;
  25. text-transform: none;
  26. white-space: normal;
  27. word-break: normal;
  28. word-spacing: normal;
  29. word-wrap: normal;
  30. font-size: 12px;
  31. opacity: 0;
  32. z-index: 100000;
  33. /* default to top */
  34. margin-top: -3px;
  35. padding: 10px 0;
  36. filter: drop-shadow(0 1px 10px var(--color-box-shadow));
  37. &.in,
  38. &.tooltip[aria-hidden='false'] {
  39. visibility: visible;
  40. opacity: 1;
  41. transition: opacity .15s;
  42. }
  43. &.top .tooltip-arrow,
  44. &[x-placement^='top'] {
  45. left: 50%;
  46. margin-left: -10px;
  47. }
  48. &.bottom,
  49. &[x-placement^='bottom'] {
  50. margin-top: 3px;
  51. padding: 10px 0;
  52. }
  53. &.right,
  54. &[x-placement^='right'] {
  55. margin-left: 3px;
  56. padding: 0 10px;
  57. .tooltip-arrow {
  58. top: 50%;
  59. left: 0;
  60. margin-top: -10px;
  61. border-width: 10px 10px 10px 0;
  62. border-right-color: var(--color-main-background);
  63. }
  64. }
  65. &.left,
  66. &[x-placement^='left'] {
  67. margin-left: -3px;
  68. padding: 0 5px;
  69. .tooltip-arrow {
  70. top: 50%;
  71. right: 0;
  72. margin-top: -10px;
  73. border-width: 10px 0 10px 10px;
  74. border-left-color: var(--color-main-background);
  75. }
  76. }
  77. /* TOP */
  78. &.top,
  79. &.top-left,
  80. &[x-placement^='top'],
  81. &.top-right {
  82. .tooltip-arrow {
  83. bottom: 0;
  84. border-width: 10px 10px 0;
  85. border-top-color: var(--color-main-background);
  86. }
  87. }
  88. &.top-left .tooltip-arrow {
  89. right: 10px;
  90. margin-bottom: -10px;
  91. }
  92. &.top-right .tooltip-arrow {
  93. left: 10px;
  94. margin-bottom: -10px;
  95. }
  96. /* BOTTOM */
  97. &.bottom,
  98. &[x-placement^='bottom'],
  99. &.bottom-left,
  100. &.bottom-right {
  101. .tooltip-arrow {
  102. top: 0;
  103. border-width: 0 10px 10px;
  104. border-bottom-color: var(--color-main-background);
  105. }
  106. }
  107. &[x-placement^='bottom'] .tooltip-arrow,
  108. &.bottom .tooltip-arrow {
  109. left: 50%;
  110. margin-left: -10px;
  111. }
  112. &.bottom-left .tooltip-arrow {
  113. right: 10px;
  114. margin-top: -10px;
  115. }
  116. &.bottom-right .tooltip-arrow {
  117. left: 10px;
  118. margin-top: -10px;
  119. }
  120. }
  121. .tooltip-inner {
  122. max-width: 350px;
  123. padding: 5px 8px;
  124. background-color: var(--color-main-background);
  125. color: var(--color-main-text);
  126. text-align: center;
  127. border-radius: var(--border-radius);
  128. }
  129. .tooltip-arrow {
  130. position: absolute;
  131. width: 0;
  132. height: 0;
  133. border-color: transparent;
  134. border-style: solid;
  135. }