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.scss 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. filter: drop-shadow(0 1px 10px $color-box-shadow);
  34. &.in {
  35. opacity: 1;
  36. }
  37. &.top {
  38. margin-top: -3px;
  39. padding: 10px 0;
  40. }
  41. &.bottom {
  42. margin-top: 3px;
  43. padding: 10px 0;
  44. }
  45. &.right {
  46. margin-left: 3px;
  47. padding: 0 10px;
  48. .tooltip-arrow {
  49. top: 50%;
  50. left: 0;
  51. margin-top: -10px;
  52. border-width: 10px 10px 10px 0;
  53. border-right-color: $color-main-background;
  54. }
  55. }
  56. &.left {
  57. margin-left: -3px;
  58. padding: 0 5px;
  59. .tooltip-arrow {
  60. top: 50%;
  61. right: 0;
  62. margin-top: -10px;
  63. border-width: 10px 0 10px 10px;
  64. border-left-color: $color-main-background;
  65. }
  66. }
  67. /* TOP */
  68. &.top .tooltip-arrow,
  69. &.top-left .tooltip-arrow,
  70. &.top-right .tooltip-arrow {
  71. bottom: 0;
  72. border-width: 10px 10px 0;
  73. border-top-color: $color-main-background;
  74. }
  75. &.top .tooltip-arrow {
  76. left: 50%;
  77. margin-left: -10px;
  78. }
  79. &.top-left .tooltip-arrow {
  80. right: 10px;
  81. margin-bottom: -10px;
  82. }
  83. &.top-right .tooltip-arrow {
  84. left: 10px;
  85. margin-bottom: -10px;
  86. }
  87. /* BOTTOM */
  88. &.bottom .tooltip-arrow,
  89. &.bottom-left .tooltip-arrow,
  90. &.bottom-right .tooltip-arrow {
  91. top: 0;
  92. border-width: 0 10px 10px;
  93. border-bottom-color: $color-main-background;
  94. }
  95. &.bottom .tooltip-arrow {
  96. left: 50%;
  97. margin-left: -10px;
  98. }
  99. &.bottom-left .tooltip-arrow {
  100. right: 10px;
  101. margin-top: -10px;
  102. }
  103. &.bottom-right .tooltip-arrow {
  104. left: 10px;
  105. margin-top: -10px;
  106. }
  107. }
  108. .tooltip-inner {
  109. max-width: 350px;
  110. padding: 5px 8px;
  111. background-color: $color-main-background;
  112. color: $color-main-text;
  113. text-align: center;
  114. border-radius: $border-radius;
  115. }
  116. .tooltip-arrow {
  117. position: absolute;
  118. width: 0;
  119. height: 0;
  120. border-color: transparent;
  121. border-style: solid;
  122. }