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.

409 lines
8.3 KiB

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