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.

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