popovers.less 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. //
  2. // Popovers
  3. // --------------------------------------------------
  4. .popover {
  5. position: absolute;
  6. top: 0;
  7. left: 0;
  8. z-index: @zindexPopover;
  9. display: none;
  10. width: 236px;
  11. padding: 1px;
  12. text-align: left; // Reset given new insertion method
  13. background-color: @popoverBackground;
  14. -webkit-background-clip: padding-box;
  15. -moz-background-clip: padding;
  16. background-clip: padding-box;
  17. border: 1px solid #ccc;
  18. border: 1px solid rgba(0,0,0,.2);
  19. .border-radius(6px);
  20. .box-shadow(0 5px 10px rgba(0,0,0,.2));
  21. // Overrides for proper insertion
  22. white-space: normal;
  23. // Offset the popover to account for the popover arrow
  24. &.top { margin-top: -10px; }
  25. &.right { margin-left: 10px; }
  26. &.bottom { margin-top: 10px; }
  27. &.left { margin-left: -10px; }
  28. }
  29. .popover-title {
  30. margin: 0; // reset heading margin
  31. padding: 8px 14px;
  32. font-size: 14px;
  33. font-weight: normal;
  34. line-height: 18px;
  35. background-color: @popoverTitleBackground;
  36. border-bottom: 1px solid darken(@popoverTitleBackground, 5%);
  37. .border-radius(5px 5px 0 0);
  38. }
  39. .popover-content {
  40. padding: 9px 14px;
  41. }
  42. // Arrows
  43. //
  44. // .arrow is outer, .arrow:after is inner
  45. .popover .arrow,
  46. .popover .arrow:after {
  47. position: absolute;
  48. display: block;
  49. width: 0;
  50. height: 0;
  51. border-color: transparent;
  52. border-style: solid;
  53. }
  54. .popover .arrow {
  55. border-width: @popoverArrowOuterWidth;
  56. }
  57. .popover .arrow:after {
  58. border-width: @popoverArrowWidth;
  59. content: "";
  60. }
  61. .popover {
  62. &.top .arrow {
  63. left: 50%;
  64. margin-left: -@popoverArrowOuterWidth;
  65. border-bottom-width: 0;
  66. border-top-color: #999; // IE8 fallback
  67. border-top-color: @popoverArrowOuterColor;
  68. bottom: -@popoverArrowOuterWidth;
  69. &:after {
  70. bottom: 1px;
  71. margin-left: -@popoverArrowWidth;
  72. border-bottom-width: 0;
  73. border-top-color: @popoverArrowColor;
  74. }
  75. }
  76. &.right .arrow {
  77. top: 50%;
  78. left: -@popoverArrowOuterWidth;
  79. margin-top: -@popoverArrowOuterWidth;
  80. border-left-width: 0;
  81. border-right-color: #999; // IE8 fallback
  82. border-right-color: @popoverArrowOuterColor;
  83. &:after {
  84. left: 1px;
  85. bottom: -@popoverArrowWidth;
  86. border-left-width: 0;
  87. border-right-color: @popoverArrowColor;
  88. }
  89. }
  90. &.bottom .arrow {
  91. left: 50%;
  92. margin-left: -@popoverArrowOuterWidth;
  93. border-top-width: 0;
  94. border-bottom-color: #999; // IE8 fallback
  95. border-bottom-color: @popoverArrowOuterColor;
  96. top: -@popoverArrowOuterWidth;
  97. &:after {
  98. top: 1px;
  99. margin-left: -@popoverArrowWidth;
  100. border-top-width: 0;
  101. border-bottom-color: @popoverArrowColor;
  102. }
  103. }
  104. &.left .arrow {
  105. top: 50%;
  106. right: -@popoverArrowOuterWidth;
  107. margin-top: -@popoverArrowOuterWidth;
  108. border-right-width: 0;
  109. border-left-color: #999; // IE8 fallback
  110. border-left-color: @popoverArrowOuterColor;
  111. &:after {
  112. right: 1px;
  113. border-right-width: 0;
  114. border-left-color: @popoverArrowColor;
  115. bottom: -@popoverArrowWidth;
  116. }
  117. }
  118. }