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.

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