bootstrap_white.less 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. @import "./boostrap/anim.less";
  2. @tooltip-prefix-cls: rc-tooltip;
  3. //
  4. // Tooltips
  5. // --------------------------------------------------
  6. @font-size-base : 12px;
  7. @line-height-base : 1.5;
  8. @border-radius-base : 3px;
  9. @overlay-shadow : 0 0 4px rgba(0, 0, 0, 0.17);
  10. //** Tooltip text color
  11. @tooltip-color: #333333;
  12. //** Tooltip background color
  13. @tooltip-bg: #ffffff;
  14. @tooltip-opacity: 0.9;
  15. @tooltip-border-width: 1px;
  16. @tooltip-border-color: #b1b1b1;
  17. @tooltip-shadow-width: 1px;
  18. //** Tooltip arrow width
  19. @tooltip-arrow-width: 6px;
  20. //** Tooltip distance with trigger
  21. //** Tooltip arrow color
  22. @tooltip-arrow-color: @tooltip-border-color;
  23. @tooltip-arrow-inner-color: @tooltip-bg;
  24. // Base class
  25. .@{tooltip-prefix-cls} {
  26. position: absolute;
  27. z-index: 1070;
  28. display: block;
  29. visibility: visible;
  30. line-height: @line-height-base;
  31. font-size: @font-size-base;
  32. background-color:rgba(0, 0, 0, 0.05);
  33. padding: @tooltip-shadow-width;
  34. opacity: @tooltip-opacity;
  35. &-hidden {
  36. display: none;
  37. }
  38. }
  39. // Wrapper for the tooltip content
  40. .@{tooltip-prefix-cls}-inner {
  41. padding: 8px 10px;
  42. color: @tooltip-color;
  43. text-align: left;
  44. text-decoration: none;
  45. background-color: @tooltip-bg;
  46. border-radius: @border-radius-base;
  47. min-height: 34px;
  48. border:@tooltip-border-width solid @tooltip-border-color;
  49. }
  50. // Arrows
  51. .@{tooltip-prefix-cls}-arrow,
  52. .@{tooltip-prefix-cls}-arrow-inner{
  53. position: absolute;
  54. width: 0;
  55. height: 0;
  56. border-color: transparent;
  57. border-style: solid;
  58. }
  59. .@{tooltip-prefix-cls} {
  60. &-placement-top &-arrow,
  61. &-placement-topLeft &-arrow,
  62. &-placement-topRight &-arrow{
  63. // bottom: -@tooltip-arrow-width + @tooltip-shadow-width;
  64. transform: translate(-50%, @tooltip-arrow-width - @tooltip-shadow-width);
  65. margin-left: -@tooltip-arrow-width;
  66. border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
  67. border-top-color: @tooltip-arrow-color;
  68. }
  69. &-placement-top &-arrow-inner,
  70. &-placement-topLeft &-arrow-inner,
  71. &-placement-topRight &-arrow-inner{
  72. bottom: @tooltip-border-width;
  73. margin-left: -@tooltip-arrow-width;
  74. border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
  75. border-top-color: @tooltip-arrow-inner-color;
  76. }
  77. &-placement-top &-arrow {
  78. left: 50%;
  79. }
  80. &-placement-topLeft &-arrow {
  81. left: 15%;
  82. }
  83. &-placement-topRight &-arrow {
  84. right: 15%;
  85. }
  86. &-placement-right &-arrow,
  87. &-placement-rightTop &-arrow,
  88. &-placement-rightBottom &-arrow {
  89. left: -@tooltip-arrow-width + @tooltip-shadow-width;
  90. margin-top: -@tooltip-arrow-width;
  91. border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
  92. border-right-color: @tooltip-arrow-color;
  93. transform: translateX(calc(-100% + @tooltip-shadow-width));
  94. }
  95. &-placement-right &-arrow-inner,
  96. &-placement-rightTop &-arrow-inner,
  97. &-placement-rightBottom &-arrow-inner {
  98. left: @tooltip-border-width;
  99. margin-top: -@tooltip-arrow-width;
  100. border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
  101. border-right-color: @tooltip-arrow-inner-color;
  102. }
  103. &-placement-right &-arrow {
  104. top: 50%;
  105. }
  106. &-placement-rightTop &-arrow {
  107. top: 15%;
  108. margin-top: 0;
  109. }
  110. &-placement-rightBottom &-arrow {
  111. bottom: 15%;
  112. }
  113. &-placement-left &-arrow,
  114. &-placement-leftTop &-arrow,
  115. &-placement-leftBottom &-arrow {
  116. right: -@tooltip-arrow-width + @tooltip-shadow-width;
  117. margin-top: -@tooltip-arrow-width;
  118. border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
  119. border-left-color: @tooltip-arrow-color;
  120. transform: translateX(calc(100% - @tooltip-shadow-width));
  121. }
  122. &-placement-left &-arrow-inner,
  123. &-placement-leftTop &-arrow-inner,
  124. &-placement-leftBottom &-arrow-inner {
  125. right: @tooltip-border-width;
  126. margin-top: -@tooltip-arrow-width;
  127. border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
  128. border-left-color: @tooltip-arrow-inner-color;
  129. }
  130. &-placement-left &-arrow {
  131. top: 50%;
  132. }
  133. &-placement-leftTop &-arrow {
  134. top: 15%;
  135. margin-top: 0;
  136. }
  137. &-placement-leftBottom &-arrow {
  138. bottom: 15%;
  139. }
  140. &-placement-bottom &-arrow,
  141. &-placement-bottomLeft &-arrow,
  142. &-placement-bottomRight &-arrow {
  143. // top: -@tooltip-arrow-width + @tooltip-shadow-width;;
  144. transform: translate(-50%, -@tooltip-arrow-width + @tooltip-shadow-width);
  145. margin-left: -@tooltip-arrow-width;
  146. border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
  147. border-bottom-color: @tooltip-arrow-color;
  148. }
  149. &-placement-bottom &-arrow-inner,
  150. &-placement-bottomLeft &-arrow-inner,
  151. &-placement-bottomRight &-arrow-inner {
  152. top: @tooltip-border-width;
  153. margin-left: -@tooltip-arrow-width;
  154. border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
  155. border-bottom-color: @tooltip-arrow-inner-color;
  156. }
  157. &-placement-bottom &-arrow {
  158. left: 50%;
  159. }
  160. &-placement-bottomLeft &-arrow {
  161. left: 15%;
  162. }
  163. &-placement-bottomRight &-arrow {
  164. right: 15%;
  165. }
  166. }