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.

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