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.

266 lines
4.7 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Popup
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributor
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'module';
  15. @element : 'popup';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Popup
  19. *******************************/
  20. .ui.popup {
  21. display: none;
  22. position: absolute;
  23. top: 0px;
  24. right: 0px;
  25. z-index: @zIndex;
  26. border: @border;
  27. max-width: @maxWidth;
  28. background-color: @background;
  29. padding: @verticalPadding @horizontalPadding;
  30. font-weight: @fontWeight;
  31. font-style: @fontStyle;
  32. color: @color;
  33. border-radius: @borderRadius;
  34. box-shadow: @boxShadow;
  35. }
  36. .ui.popup > .header {
  37. padding: 0em;
  38. font-family: @headerFont;
  39. font-size: @headerFontSize;
  40. line-height: @headerLineHeight;
  41. font-weight: bold;
  42. }
  43. .ui.popup > .header + .content {
  44. padding-top: @headerDistance;
  45. }
  46. .ui.popup:before {
  47. position: absolute;
  48. content: '';
  49. width: @arrowSize;
  50. height: @arrowSize;
  51. background: @arrowBackground;
  52. transform: rotate(45deg);
  53. z-index: @arrowZIndex;
  54. box-shadow: @arrowBoxShadow;
  55. }
  56. /*******************************
  57. Types
  58. *******************************/
  59. /*--------------
  60. Spacing
  61. ---------------*/
  62. .ui.popup {
  63. margin: 0em;
  64. }
  65. .ui.popup.bottom {
  66. margin: @popupDistanceAway 0em 0em;
  67. }
  68. .ui.popup.top {
  69. margin: 0em 0em @popupDistanceAway;
  70. }
  71. .ui.popup.left.center {
  72. margin: 0em @popupDistanceAway 0em 0em;
  73. }
  74. .ui.popup.right.center {
  75. margin: 0em 0em 0em @popupDistanceAway;
  76. }
  77. .ui.popup.center {
  78. margin-left: -1.25em;
  79. }
  80. /*--------------
  81. Pointer
  82. ---------------*/
  83. /*--- Below ---*/
  84. .ui.bottom.center.popup:before {
  85. margin-left: @arrowOffset;
  86. top: @arrowOffset;
  87. left: 50%;
  88. right: auto;
  89. bottom: auto;
  90. box-shadow: @bottomArrowBoxShadow;
  91. }
  92. .ui.bottom.left.popup {
  93. margin-left: @boxArrowOffset;
  94. }
  95. .ui.bottom.left.popup:before {
  96. top: @arrowOffset;
  97. left: @arrowDistanceFromEdge;
  98. right: auto;
  99. bottom: auto;
  100. margin-left: 0em;
  101. box-shadow: @bottomArrowBoxShadow;
  102. }
  103. .ui.bottom.right.popup {
  104. margin-right: @boxArrowOffset;
  105. }
  106. .ui.bottom.right.popup:before {
  107. top: @arrowOffset;
  108. right: @arrowDistanceFromEdge;
  109. bottom: auto;
  110. left: auto;
  111. margin-left: 0em;
  112. box-shadow: @bottomArrowBoxShadow;
  113. }
  114. /*--- Above ---*/
  115. .ui.top.center.popup:before {
  116. top: auto;
  117. right: auto;
  118. bottom: @arrowOffset;
  119. left: 50%;
  120. margin-left: @arrowOffset;
  121. }
  122. .ui.top.left.popup {
  123. margin-left: @boxArrowOffset;
  124. }
  125. .ui.top.left.popup:before {
  126. bottom: @arrowOffset;
  127. left: @arrowDistanceFromEdge;
  128. top: auto;
  129. right: auto;
  130. margin-left: 0em;
  131. }
  132. .ui.top.right.popup {
  133. margin-right: @boxArrowOffset;
  134. }
  135. .ui.top.right.popup:before {
  136. bottom: @arrowOffset;
  137. right: @arrowDistanceFromEdge;
  138. top: auto;
  139. left: auto;
  140. margin-left: 0em;
  141. }
  142. /*--- Left Center ---*/
  143. .ui.left.center.popup:before {
  144. top: 50%;
  145. right: @arrowOffset;
  146. bottom: auto;
  147. left: auto;
  148. margin-top: @arrowOffset;
  149. box-shadow: @leftArrowBoxShadow;
  150. }
  151. /*--- Right Center ---*/
  152. .ui.right.center.popup:before {
  153. top: 50%;
  154. left: @arrowOffset;
  155. bottom: auto;
  156. right: auto;
  157. margin-top: @arrowOffset;
  158. box-shadow: @rightArrowBoxShadow;
  159. }
  160. /*******************************
  161. States
  162. *******************************/
  163. .ui.loading.popup {
  164. display: block;
  165. visibility: hidden;
  166. z-index: @loadingZIndex;
  167. }
  168. .ui.animating.popup,
  169. .ui.visible.popup {
  170. display: block;
  171. }
  172. /*******************************
  173. Variations
  174. *******************************/
  175. /*--------------
  176. Wide
  177. ---------------*/
  178. .ui.wide.popup {
  179. width: @wideWidth;
  180. max-width: @wideWidth;
  181. }
  182. .ui.very.wide.popup {
  183. width: @veryWideWidth;
  184. max-width: @veryWideWidth;
  185. }
  186. /*--------------
  187. Fluid
  188. ---------------*/
  189. .ui.fluid.popup {
  190. width: 100%;
  191. max-width: 99999px;
  192. }
  193. /*--------------
  194. Colors
  195. ---------------*/
  196. /* Inverted colors */
  197. .ui.inverted.popup {
  198. background: @invertedBackground;
  199. color: @invertedColor;
  200. border: @invertedBorder;
  201. box-shadow: @invertedBoxShadow;
  202. }
  203. .ui.inverted.popup .header {
  204. background-color: @invertedHeaderBackground;
  205. color: @invertedHeaderColor;
  206. }
  207. .ui.inverted.popup:before {
  208. background-color: @invertedArrowColor;
  209. box-shadow: none;
  210. }
  211. /*--------------
  212. Sizes
  213. ---------------*/
  214. .ui.small.popup {
  215. font-size: @small;
  216. }
  217. .ui.popup {
  218. font-size: @medium;
  219. }
  220. .ui.large.popup {
  221. font-size: @large;
  222. }
  223. .ui.huge.popup {
  224. font-size: @huge;
  225. }
  226. .loadUIOverrides();