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.

342 lines
6.8 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. /*
  2. * # Semantic - Modal
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'module';
  15. @element : 'modal';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Modal
  19. *******************************/
  20. .ui.modal {
  21. display: none;
  22. position: fixed;
  23. z-index: 1001;
  24. top: 50%;
  25. left: 50%;
  26. text-align: left;
  27. width: @width;
  28. margin-left: @xOffset;
  29. background: @background;
  30. border: @border;
  31. box-shadow: @boxShadow;
  32. border-radius: @borderRadius;
  33. user-select: text;
  34. }
  35. /*******************************
  36. Content
  37. *******************************/
  38. /*--------------
  39. Close
  40. ---------------*/
  41. .ui.modal > .close {
  42. cursor: pointer;
  43. position: absolute;
  44. top: @closeTop;
  45. right: @closeRight;
  46. z-index: 1;
  47. opacity: @closeOpacity;
  48. font-size: @closeSize;
  49. color: @closeColor;
  50. width: @closeHitbox;
  51. height: @closeHitbox;
  52. padding: @closePadding;
  53. }
  54. .ui.modal > .close:hover {
  55. opacity: 1;
  56. }
  57. /*--------------
  58. Header
  59. ---------------*/
  60. .ui.modal > .header {
  61. display: block;
  62. font-family: @headerFontFamily;
  63. background: @headerBackground;
  64. margin: @headerMargin;
  65. padding: @headerPadding;
  66. font-size: @headerFontSize;
  67. font-weight: @headerFontWeight;
  68. border-bottom: @headerBottomBorder;
  69. border-top-left-radius: @borderRadius;
  70. border-top-right-radius: @borderRadius;
  71. }
  72. /*--------------
  73. Content
  74. ---------------*/
  75. .ui.modal > .content {
  76. position: relative;
  77. display: table;
  78. width: 100%;
  79. font-size: @contentFontSize;
  80. line-height: @contentLineHeight;
  81. padding: @contentPadding;
  82. background: @contentBackground;
  83. border-bottom-left-radius: @borderRadius;
  84. border-bottom-right-radius: @borderRadius;
  85. }
  86. .ui.modal > .content:only-child {
  87. border-radius: @borderRadius;
  88. }
  89. .ui.modal > .content > .image {
  90. display: table-cell;
  91. padding-right: @imagePadding;
  92. min-width: @imageMinWidth;
  93. }
  94. .ui.modal > .content > .description {
  95. display: table-cell;
  96. vertical-align: top;
  97. padding-left: @descriptionPadding;
  98. min-width: @descriptionMinWidth;
  99. }
  100. /*rtl:ignore*/
  101. .ui.modal > .content > .image > i.icon {
  102. font-size: @imageIconSize;
  103. margin: 0em;
  104. }
  105. /*--------------
  106. Actions
  107. ---------------*/
  108. .ui.modal .actions {
  109. padding: @actionPadding;
  110. text-align: right;
  111. }
  112. .ui.modal .actions > .button {
  113. margin-left: @buttonDistance;
  114. }
  115. /*-------------------
  116. Responsive
  117. --------------------*/
  118. /* Modal Width */
  119. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  120. .ui.modal {
  121. width: @mobileWidth;
  122. margin: @mobileMargin;
  123. }
  124. }
  125. @media only screen and (min-width : @tabletBreakpoint) {
  126. .ui.modal {
  127. width: @tabletWidth;
  128. margin: @tabletMargin;
  129. }
  130. }
  131. @media only screen and (min-width : @computerBreakpoint) {
  132. .ui.modal {
  133. width: @computerWidth;
  134. margin: @computerMargin;
  135. }
  136. }
  137. @media only screen and (min-width : @largeMonitorBreakpoint) {
  138. .ui.modal {
  139. width: @largeMonitorWidth;
  140. margin: @largeMonitorMargin;
  141. }
  142. }
  143. @media only screen and (min-width : @widescreenMonitorBreakpoint) {
  144. .ui.modal {
  145. width: @widescreenMonitorWidth;
  146. margin: @widescreenMonitorMargin;
  147. }
  148. }
  149. /* Position Adjustments */
  150. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  151. /*rtl:ignore*/
  152. .ui.modal .content > .image {
  153. display: block;
  154. padding: @mobileImagePadding;
  155. }
  156. /*rtl:ignore*/
  157. .ui.modal .content > .description {
  158. display: block;
  159. padding: @mobileDescriptionPadding;
  160. box-shadow: none;
  161. }
  162. .ui.modal .content .image {
  163. width: auto !important;
  164. max-width: 100%;
  165. }
  166. .ui.modal .actions {
  167. padding-bottom: 0em
  168. }
  169. .ui.modal .actions > .buttons,
  170. .ui.modal .actions > .button {
  171. margin-bottom: @mobileButtonDistance;
  172. }
  173. }
  174. /* Tablet and Mobile */
  175. @media only screen and (max-width : @computerBreakpoint) {
  176. .ui.modal > .close {
  177. top: @innerCloseTop;
  178. right: @innerCloseRight;
  179. color: @innerCloseColor;
  180. }
  181. }
  182. /*******************************
  183. Types
  184. *******************************/
  185. .ui.basic.modal {
  186. background-color: transparent;
  187. border: none;
  188. color: @basicModalColor;
  189. }
  190. .ui.basic.modal > .close {
  191. top: @basicModalCloseTop;
  192. right: @basicModalCloseRight;
  193. }
  194. .ui.basic.modal .content {
  195. background-color: transparent;
  196. }
  197. /*******************************
  198. Variations
  199. *******************************/
  200. /* A modal that cannot fit on the page */
  201. .ui.modal.scrolling {
  202. position: absolute;
  203. margin-top: @scrollingTopMargin;
  204. }
  205. /*******************************
  206. States
  207. *******************************/
  208. .ui.active.modal {
  209. display: block;
  210. }
  211. /*******************************
  212. Variations
  213. *******************************/
  214. /*--------------
  215. Full Screen
  216. ---------------*/
  217. .ui.fullscreen.modal {
  218. width: @fullScreenWidth !important;
  219. margin: @fullScreenMargin !important;
  220. }
  221. .ui.fullscreen.modal > .close {
  222. right: 0em;
  223. }
  224. /*--------------
  225. Size
  226. ---------------*/
  227. /* Small */
  228. .ui.small.modal > .header {
  229. font-size: @smallHeaderSize;
  230. }
  231. /* Small Modal Width */
  232. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  233. .ui.small.modal {
  234. width: @smallMobileWidth;
  235. margin: @smallMobileMargin;
  236. }
  237. }
  238. @media only screen and (min-width : @tabletBreakpoint) {
  239. .ui.small.modal {
  240. width: @smallTabletWidth;
  241. margin: @smallTabletMargin;
  242. }
  243. }
  244. @media only screen and (min-width : @computerBreakpoint) {
  245. .ui.small.modal {
  246. width: @smallComputerWidth;
  247. margin: @smallComputerMargin;
  248. }
  249. }
  250. @media only screen and (min-width : @largeMonitorBreakpoint) {
  251. .ui.small.modal {
  252. width: @smallLargeMonitorWidth;
  253. margin: @smallLargeMonitorMargin;
  254. }
  255. }
  256. @media only screen and (min-width : @widescreenMonitorBreakpoint) {
  257. .ui.small.modal {
  258. width: @smallWidescreenMonitorWidth;
  259. margin: @smallWidescreenMonitorMargin;
  260. }
  261. }
  262. /* Large Modal Width */
  263. .ui.large.modal > .header {
  264. font-size: @largeHeaderSize;
  265. }
  266. @media only screen and (max-width : (@tabletBreakpoint - 1px)) {
  267. .ui.large.modal {
  268. width: @largeMobileWidth;
  269. margin: @largeMobileMargin;
  270. }
  271. }
  272. @media only screen and (min-width : @tabletBreakpoint) {
  273. .ui.large.modal {
  274. width: @largeTabletWidth;
  275. margin: @largeTabletMargin;
  276. }
  277. }
  278. @media only screen and (min-width : @computerBreakpoint) {
  279. .ui.large.modal {
  280. width: @largeComputerWidth;
  281. margin: @largeComputerMargin;
  282. }
  283. }
  284. @media only screen and (min-width : @largeMonitorBreakpoint) {
  285. .ui.large.modal {
  286. width: @largeLargeMonitorWidth;
  287. margin: @largeLargeMonitorMargin;
  288. }
  289. }
  290. @media only screen and (min-width : @widescreenMonitorBreakpoint) {
  291. .ui.large.modal {
  292. width: @largeWidescreenMonitorWidth;
  293. margin: @largeWidescreenMonitorMargin;
  294. }
  295. }
  296. .loadUIOverrides();