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.

272 lines
4.8 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
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. /*--------------
  78. Pointer
  79. ---------------*/
  80. /*--- Below ---*/
  81. .ui.bottom.center.popup:before {
  82. margin-left: @arrowOffset;
  83. top: @arrowOffset;
  84. left: 50%;
  85. right: auto;
  86. bottom: auto;
  87. box-shadow: @bottomArrowBoxShadow;
  88. }
  89. .ui.bottom.left.popup {
  90. margin-left: @boxArrowOffset;
  91. }
  92. .ui.bottom.left.popup:before {
  93. top: @arrowOffset;
  94. left: @arrowDistanceFromEdge;
  95. right: auto;
  96. bottom: auto;
  97. margin-left: 0em;
  98. box-shadow: @bottomArrowBoxShadow;
  99. }
  100. .ui.bottom.right.popup {
  101. margin-right: @boxArrowOffset;
  102. }
  103. .ui.bottom.right.popup:before {
  104. top: @arrowOffset;
  105. right: @arrowDistanceFromEdge;
  106. bottom: auto;
  107. left: auto;
  108. margin-left: 0em;
  109. box-shadow: @bottomArrowBoxShadow;
  110. }
  111. /*--- Above ---*/
  112. .ui.top.center.popup:before {
  113. top: auto;
  114. right: auto;
  115. bottom: @arrowOffset;
  116. left: 50%;
  117. margin-left: @arrowOffset;
  118. }
  119. .ui.top.left.popup {
  120. margin-left: @boxArrowOffset;
  121. }
  122. .ui.top.left.popup:before {
  123. bottom: @arrowOffset;
  124. left: @arrowDistanceFromEdge;
  125. top: auto;
  126. right: auto;
  127. margin-left: 0em;
  128. }
  129. .ui.top.right.popup {
  130. margin-right: @boxArrowOffset;
  131. }
  132. .ui.top.right.popup:before {
  133. bottom: @arrowOffset;
  134. right: @arrowDistanceFromEdge;
  135. top: auto;
  136. left: auto;
  137. margin-left: 0em;
  138. }
  139. /*--- Left Center ---*/
  140. .ui.left.center.popup:before {
  141. top: 50%;
  142. right: @arrowOffset;
  143. bottom: auto;
  144. left: auto;
  145. margin-top: @arrowOffset;
  146. box-shadow: @leftArrowBoxShadow;
  147. }
  148. /*--- Right Center ---*/
  149. .ui.right.center.popup:before {
  150. top: 50%;
  151. left: @arrowOffset;
  152. bottom: auto;
  153. right: auto;
  154. margin-top: @arrowOffset;
  155. box-shadow: @rightArrowBoxShadow;
  156. }
  157. /*******************************
  158. States
  159. *******************************/
  160. .ui.loading.popup {
  161. display: block;
  162. visibility: hidden;
  163. z-index: @loadingZIndex;
  164. }
  165. .ui.animating.popup,
  166. .ui.visible.popup {
  167. display: block;
  168. }
  169. /*******************************
  170. Variations
  171. *******************************/
  172. /*--------------
  173. Wide
  174. ---------------*/
  175. .ui.wide.popup {
  176. width: @wideWidth;
  177. max-width: @wideWidth;
  178. }
  179. .ui[class*="very wide"].popup {
  180. width: @veryWideWidth;
  181. max-width: @veryWideWidth;
  182. }
  183. /*--------------
  184. Fluid
  185. ---------------*/
  186. .ui.fluid.popup {
  187. width: 100%;
  188. max-width: 99999px;
  189. }
  190. /*--------------
  191. Colors
  192. ---------------*/
  193. /* Inverted colors */
  194. .ui.inverted.popup {
  195. background: @invertedBackground;
  196. color: @invertedColor;
  197. border: @invertedBorder;
  198. box-shadow: @invertedBoxShadow;
  199. }
  200. .ui.inverted.popup .header {
  201. background-color: @invertedHeaderBackground;
  202. color: @invertedHeaderColor;
  203. }
  204. .ui.inverted.popup:before {
  205. background-color: @invertedArrowColor;
  206. box-shadow: none;
  207. }
  208. /*--------------
  209. Flowing
  210. ---------------*/
  211. .ui.flowing.popup {
  212. max-width: 9999px;
  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();