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.

348 lines
7.0 KiB

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