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.

270 lines
4.8 KiB

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. .ui.popup .ui.button {
  57. width: @popupButtonWidth;
  58. }
  59. /*******************************
  60. Types
  61. *******************************/
  62. /*--------------
  63. Spacing
  64. ---------------*/
  65. .ui.popup {
  66. margin: 0em;
  67. }
  68. .ui.popup.bottom {
  69. margin: @popupDistanceAway 0em 0em;
  70. }
  71. .ui.popup.top {
  72. margin: 0em 0em @popupDistanceAway;
  73. }
  74. .ui.popup.left.center {
  75. margin: 0em @popupDistanceAway 0em 0em;
  76. }
  77. .ui.popup.right.center {
  78. margin: 0em 0em 0em @popupDistanceAway;
  79. }
  80. .ui.popup.center {
  81. margin-left: -1.25em;
  82. }
  83. /*--------------
  84. Pointer
  85. ---------------*/
  86. /*--- Below ---*/
  87. .ui.bottom.center.popup:before {
  88. margin-left: @arrowOffset;
  89. top: @arrowOffset;
  90. left: 50%;
  91. right: auto;
  92. bottom: auto;
  93. box-shadow: @bottomArrowBoxShadow;
  94. }
  95. .ui.bottom.left.popup {
  96. margin-left: @boxArrowOffset;
  97. }
  98. .ui.bottom.left.popup:before {
  99. top: @arrowOffset;
  100. left: @arrowDistanceFromEdge;
  101. right: auto;
  102. bottom: auto;
  103. margin-left: 0em;
  104. box-shadow: @bottomArrowBoxShadow;
  105. }
  106. .ui.bottom.right.popup {
  107. margin-right: @boxArrowOffset;
  108. }
  109. .ui.bottom.right.popup:before {
  110. top: @arrowOffset;
  111. right: @arrowDistanceFromEdge;
  112. bottom: auto;
  113. left: auto;
  114. margin-left: 0em;
  115. box-shadow: @bottomArrowBoxShadow;
  116. }
  117. /*--- Above ---*/
  118. .ui.top.center.popup:before {
  119. top: auto;
  120. right: auto;
  121. bottom: @arrowOffset;
  122. left: 50%;
  123. margin-left: @arrowOffset;
  124. }
  125. .ui.top.left.popup {
  126. margin-left: @boxArrowOffset;
  127. }
  128. .ui.top.left.popup:before {
  129. bottom: @arrowOffset;
  130. left: @arrowDistanceFromEdge;
  131. top: auto;
  132. right: auto;
  133. margin-left: 0em;
  134. }
  135. .ui.top.right.popup {
  136. margin-right: @boxArrowOffset;
  137. }
  138. .ui.top.right.popup:before {
  139. bottom: @arrowOffset;
  140. right: @arrowDistanceFromEdge;
  141. top: auto;
  142. left: auto;
  143. margin-left: 0em;
  144. }
  145. /*--- Left Center ---*/
  146. .ui.left.center.popup:before {
  147. top: 50%;
  148. right: @arrowOffset;
  149. bottom: auto;
  150. left: auto;
  151. margin-top: @arrowOffset;
  152. box-shadow: @leftArrowBoxShadow;
  153. }
  154. /*--- Right Center ---*/
  155. .ui.right.center.popup:before {
  156. top: 50%;
  157. left: @arrowOffset;
  158. bottom: auto;
  159. right: auto;
  160. margin-top: @arrowOffset;
  161. box-shadow: @rightArrowBoxShadow;
  162. }
  163. /*******************************
  164. States
  165. *******************************/
  166. .ui.loading.popup {
  167. display: block;
  168. visibility: hidden;
  169. z-index: @loadingZIndex;
  170. }
  171. .ui.animating.popup,
  172. .ui.visible.popup {
  173. display: block;
  174. }
  175. /*******************************
  176. Variations
  177. *******************************/
  178. /*--------------
  179. Wide
  180. ---------------*/
  181. .ui.wide.popup {
  182. width: @wideWidth;
  183. max-width: @wideWidth;
  184. }
  185. .ui.very.wide.popup {
  186. width: @veryWideWidth;
  187. max-width: @veryWideWidth;
  188. }
  189. /*--------------
  190. Fluid
  191. ---------------*/
  192. .ui.fluid.popup {
  193. width: 100%;
  194. max-width: 99999px;
  195. }
  196. /*--------------
  197. Colors
  198. ---------------*/
  199. /* Inverted colors */
  200. .ui.inverted.popup {
  201. background: @invertedBackground;
  202. color: @invertedColor;
  203. border: @invertedBorder;
  204. box-shadow: @invertedBoxShadow;
  205. }
  206. .ui.inverted.popup .header {
  207. background-color: @invertedHeaderBackground;
  208. color: @invertedHeaderColor;
  209. }
  210. .ui.inverted.popup:before {
  211. background-color: @invertedArrowColor;
  212. box-shadow: none;
  213. }
  214. /*--------------
  215. Sizes
  216. ---------------*/
  217. .ui.small.popup {
  218. font-size: @small;
  219. }
  220. .ui.popup {
  221. font-size: @medium;
  222. }
  223. .ui.large.popup {
  224. font-size: @large;
  225. }
  226. .ui.huge.popup {
  227. font-size: @huge;
  228. }
  229. .loadUIOverrides();