modal.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. /*!
  2. * # Fomantic-UI - Modal
  3. * http://github.com/fomantic/Fomantic-UI/
  4. *
  5. *
  6. * Released under the MIT license
  7. * http://opensource.org/licenses/MIT
  8. *
  9. */
  10. /*******************************
  11. Modal
  12. *******************************/
  13. .ui.modal {
  14. position: absolute;
  15. display: none;
  16. z-index: 1001;
  17. text-align: left;
  18. background: #FFFFFF;
  19. border: none;
  20. -webkit-box-shadow: 1px 3px 3px 0 rgba(0, 0, 0, 0.2), 1px 3px 15px 2px rgba(0, 0, 0, 0.2);
  21. box-shadow: 1px 3px 3px 0 rgba(0, 0, 0, 0.2), 1px 3px 15px 2px rgba(0, 0, 0, 0.2);
  22. -webkit-transform-origin: 50% 25%;
  23. transform-origin: 50% 25%;
  24. -webkit-box-flex: 0;
  25. -ms-flex: 0 0 auto;
  26. flex: 0 0 auto;
  27. border-radius: 0.28571429rem;
  28. -webkit-user-select: text;
  29. -moz-user-select: text;
  30. -ms-user-select: text;
  31. user-select: text;
  32. will-change: top, left, margin, transform, opacity;
  33. }
  34. .ui.modal > :first-child:not(.icon):not(.dimmer),
  35. .ui.modal > .icon:first-child + *,
  36. .ui.modal > .dimmer:first-child + *:not(.icon),
  37. .ui.modal > .dimmer:first-child + .icon + * {
  38. border-top-left-radius: 0.28571429rem;
  39. border-top-right-radius: 0.28571429rem;
  40. }
  41. .ui.modal > :last-child {
  42. border-bottom-left-radius: 0.28571429rem;
  43. border-bottom-right-radius: 0.28571429rem;
  44. }
  45. /*******************************
  46. Content
  47. *******************************/
  48. /*--------------
  49. Close
  50. ---------------*/
  51. .ui.modal > .close {
  52. cursor: pointer;
  53. position: absolute;
  54. top: -2.5rem;
  55. right: -2.5rem;
  56. z-index: 1;
  57. opacity: 0.8;
  58. font-size: 1.25em;
  59. color: #FFFFFF;
  60. width: 2.25rem;
  61. height: 2.25rem;
  62. padding: 0.625rem 0 0 0;
  63. }
  64. .ui.modal > .close:hover {
  65. opacity: 1;
  66. }
  67. /*--------------
  68. Header
  69. ---------------*/
  70. .ui.modal > .header {
  71. display: block;
  72. font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
  73. background: #FFFFFF;
  74. margin: 0;
  75. padding: 1.25rem 1.5rem;
  76. -webkit-box-shadow: none;
  77. box-shadow: none;
  78. color: rgba(0, 0, 0, 0.85);
  79. border-bottom: 1px solid rgba(34, 36, 38, 0.15);
  80. }
  81. .ui.modal > .header:not(.ui) {
  82. font-size: 1.42857143rem;
  83. line-height: 1.28571429em;
  84. font-weight: bold;
  85. }
  86. /*--------------
  87. Content
  88. ---------------*/
  89. .ui.modal > .content {
  90. display: block;
  91. width: 100%;
  92. font-size: 1em;
  93. line-height: 1.4;
  94. padding: 1.5rem;
  95. background: #FFFFFF;
  96. }
  97. .ui.modal > .image.content {
  98. display: -webkit-box;
  99. display: -ms-flexbox;
  100. display: flex;
  101. -webkit-box-orient: horizontal;
  102. -webkit-box-direction: normal;
  103. -ms-flex-direction: row;
  104. flex-direction: row;
  105. }
  106. /* Image */
  107. .ui.modal > .content > .image {
  108. display: block;
  109. -webkit-box-flex: 0;
  110. -ms-flex: 0 1 auto;
  111. flex: 0 1 auto;
  112. width: '';
  113. -ms-flex-item-align: start;
  114. align-self: start;
  115. max-width: 100%;
  116. }
  117. .ui.modal > [class*="top aligned"] {
  118. -ms-flex-item-align: start;
  119. align-self: start;
  120. }
  121. .ui.modal > [class*="middle aligned"] {
  122. -ms-flex-item-align: center;
  123. align-self: center;
  124. }
  125. .ui.modal > [class*="stretched"] {
  126. -ms-flex-item-align: stretch;
  127. align-self: stretch;
  128. }
  129. /* Description */
  130. .ui.modal > .content > .description {
  131. display: block;
  132. -webkit-box-flex: 1;
  133. -ms-flex: 1 0 auto;
  134. flex: 1 0 auto;
  135. min-width: 0;
  136. -ms-flex-item-align: start;
  137. align-self: start;
  138. }
  139. .ui.modal > .content > .icon + .description,
  140. .ui.modal > .content > .image + .description {
  141. -webkit-box-flex: 0;
  142. -ms-flex: 0 1 auto;
  143. flex: 0 1 auto;
  144. min-width: '';
  145. width: auto;
  146. padding-left: 2em;
  147. }
  148. /*rtl:ignore*/
  149. .ui.modal > .content > .image > i.icon {
  150. margin: 0;
  151. opacity: 1;
  152. width: auto;
  153. line-height: 1;
  154. font-size: 8rem;
  155. }
  156. /*--------------
  157. Actions
  158. ---------------*/
  159. .ui.modal > .actions {
  160. background: #F9FAFB;
  161. padding: 1rem 1rem;
  162. border-top: 1px solid rgba(34, 36, 38, 0.15);
  163. text-align: right;
  164. }
  165. .ui.modal .actions > .button {
  166. margin-left: 0.75em;
  167. }
  168. .ui.basic.modal > .actions {
  169. border-top: none;
  170. }
  171. /*-------------------
  172. Responsive
  173. --------------------*/
  174. /* Modal Width */
  175. @media only screen and (max-width: 767.98px) {
  176. .ui.modal:not(.fullscreen) {
  177. width: 95%;
  178. margin: 0 0 0 0;
  179. }
  180. }
  181. @media only screen and (min-width: 768px) {
  182. .ui.modal:not(.fullscreen) {
  183. width: 88%;
  184. margin: 0 0 0 0;
  185. }
  186. }
  187. @media only screen and (min-width: 992px) {
  188. .ui.modal:not(.fullscreen) {
  189. width: 850px;
  190. margin: 0 0 0 0;
  191. }
  192. }
  193. @media only screen and (min-width: 1200px) {
  194. .ui.modal:not(.fullscreen) {
  195. width: 900px;
  196. margin: 0 0 0 0;
  197. }
  198. }
  199. @media only screen and (min-width: 1920px) {
  200. .ui.modal:not(.fullscreen) {
  201. width: 950px;
  202. margin: 0 0 0 0;
  203. }
  204. }
  205. /* Tablet and Mobile */
  206. @media only screen and (max-width: 991.98px) {
  207. .ui.modal > .header {
  208. padding-right: 2.25rem;
  209. }
  210. .ui.modal > .close {
  211. top: 1.0535rem;
  212. right: 1rem;
  213. color: #AAAAAA;
  214. }
  215. }
  216. /* Mobile */
  217. @media only screen and (max-width: 767.98px) {
  218. .ui.modal > .header {
  219. padding: 0.75rem 1rem !important;
  220. padding-right: 2.25rem !important;
  221. }
  222. .ui.overlay.fullscreen.modal > .content.content.content {
  223. min-height: calc(100vh - 8.1rem);
  224. }
  225. .ui.overlay.fullscreen.modal > .scrolling.content.content.content {
  226. max-height: calc(100vh - 8.1rem);
  227. }
  228. .ui.modal > .content {
  229. display: block;
  230. padding: 1rem !important;
  231. }
  232. .ui.modal > .close {
  233. top: 0.5rem !important;
  234. right: 0.5rem !important;
  235. }
  236. /*rtl:ignore*/
  237. .ui.modal .image.content {
  238. -webkit-box-orient: vertical;
  239. -webkit-box-direction: normal;
  240. -ms-flex-direction: column;
  241. flex-direction: column;
  242. }
  243. .ui.modal .content > .image {
  244. display: block;
  245. max-width: 100%;
  246. margin: 0 auto !important;
  247. text-align: center;
  248. padding: 0 0 1rem !important;
  249. }
  250. .ui.modal > .content > .image > i.icon {
  251. font-size: 5rem;
  252. text-align: center;
  253. }
  254. /*rtl:ignore*/
  255. .ui.modal .content > .description {
  256. display: block;
  257. width: 100% !important;
  258. margin: 0 !important;
  259. padding: 1rem 0 !important;
  260. -webkit-box-shadow: none;
  261. box-shadow: none;
  262. }
  263. /* Let Buttons Stack */
  264. .ui.modal > .actions {
  265. padding: 1rem 1rem 0rem !important;
  266. }
  267. .ui.modal .actions > .buttons,
  268. .ui.modal .actions > .button {
  269. margin-bottom: 1rem;
  270. }
  271. }
  272. /*--------------
  273. Coupling
  274. ---------------*/
  275. .ui.inverted.dimmer > .ui.modal {
  276. -webkit-box-shadow: 1px 3px 10px 2px rgba(0, 0, 0, 0.2);
  277. box-shadow: 1px 3px 10px 2px rgba(0, 0, 0, 0.2);
  278. }
  279. /*******************************
  280. Types
  281. *******************************/
  282. .ui.basic.modal {
  283. background-color: transparent;
  284. border: none;
  285. border-radius: 0;
  286. -webkit-box-shadow: none !important;
  287. box-shadow: none !important;
  288. color: #FFFFFF;
  289. }
  290. .ui.basic.modal > .header,
  291. .ui.basic.modal > .content,
  292. .ui.basic.modal > .actions {
  293. background-color: transparent;
  294. }
  295. .ui.basic.modal > .header {
  296. color: #FFFFFF;
  297. }
  298. .ui.basic.modal > .close {
  299. top: 1rem;
  300. right: 1.5rem;
  301. color: #FFFFFF;
  302. }
  303. .ui.inverted.dimmer > .basic.modal {
  304. color: #AAAAAA;
  305. }
  306. .ui.inverted.dimmer > .ui.basic.modal > .header {
  307. color: rgba(0, 0, 0, 0.85);
  308. }
  309. /* Resort to margin positioning if legacy */
  310. .ui.legacy.legacy.modal,
  311. .ui.legacy.legacy.page.dimmer > .ui.modal {
  312. left: 50% !important;
  313. }
  314. .ui.legacy.legacy.modal:not(.aligned),
  315. .ui.legacy.legacy.page.dimmer > .ui.modal:not(.aligned) {
  316. top: 50%;
  317. }
  318. .ui.legacy.legacy.page.dimmer > .ui.scrolling.modal:not(.aligned),
  319. .ui.page.dimmer > .ui.scrolling.legacy.legacy.modal:not(.aligned),
  320. .ui.top.aligned.legacy.legacy.page.dimmer > .ui.modal:not(.aligned),
  321. .ui.top.aligned.dimmer > .ui.legacy.legacy.modal:not(.aligned) {
  322. top: auto;
  323. }
  324. .ui.legacy.overlay.fullscreen.modal {
  325. margin-top: -1rem !important;
  326. }
  327. /*******************************
  328. States
  329. *******************************/
  330. .ui.loading.modal {
  331. display: block;
  332. visibility: hidden;
  333. z-index: -1;
  334. }
  335. .ui.active.modal {
  336. display: block;
  337. }
  338. /*******************************
  339. Variations
  340. *******************************/
  341. /*--------------
  342. Aligned
  343. ---------------*/
  344. .ui.top.aligned.modal {
  345. top: 5vh;
  346. }
  347. .ui.bottom.aligned.modal {
  348. bottom: 5vh;
  349. }
  350. @media only screen and (max-width: 767.98px) {
  351. .ui.top.aligned.modal {
  352. top: 1rem;
  353. }
  354. .ui.bottom.aligned.modal {
  355. bottom: 1rem;
  356. }
  357. }
  358. /*--------------
  359. Scrolling
  360. ---------------*/
  361. /* Scrolling Dimmer */
  362. .scrolling.dimmable.dimmed {
  363. overflow: hidden;
  364. }
  365. .scrolling.dimmable > .dimmer {
  366. -webkit-box-pack: start;
  367. -ms-flex-pack: start;
  368. justify-content: flex-start;
  369. position: fixed;
  370. }
  371. .scrolling.dimmable.dimmed > .dimmer {
  372. overflow: auto;
  373. -webkit-overflow-scrolling: touch;
  374. }
  375. .modals.dimmer .ui.scrolling.modal:not(.fullscreen) {
  376. margin: 1rem auto;
  377. }
  378. /* Undetached Scrolling */
  379. .scrolling.undetached.dimmable.dimmed {
  380. overflow: auto;
  381. -webkit-overflow-scrolling: touch;
  382. }
  383. .scrolling.undetached.dimmable.dimmed > .dimmer {
  384. overflow: hidden;
  385. }
  386. .scrolling.undetached.dimmable .ui.scrolling.modal:not(.fullscreen) {
  387. position: absolute;
  388. left: 50%;
  389. margin-top: 1rem !important;
  390. }
  391. /* Scrolling Content */
  392. .ui.modal > .scrolling.content {
  393. max-height: calc(80vh - 10rem);
  394. overflow: auto;
  395. }
  396. .ui.overlay.fullscreen.modal > .content {
  397. min-height: calc(100vh - 9.1rem);
  398. }
  399. .ui.overlay.fullscreen.modal > .scrolling.content {
  400. max-height: calc(100vh - 9.1rem);
  401. }
  402. /*--------------
  403. Full Screen
  404. ---------------*/
  405. .ui.fullscreen.modal {
  406. width: 95%;
  407. left: 2.5%;
  408. margin: 1em auto;
  409. }
  410. .ui.overlay.fullscreen.modal {
  411. width: 100%;
  412. left: 0;
  413. margin: 0 auto;
  414. top: 0;
  415. border-radius: 0;
  416. }
  417. .ui.fullscreen.modal > .header {
  418. padding-right: 2.25rem;
  419. }
  420. .ui.fullscreen.modal > .close {
  421. top: 1.0535rem;
  422. right: 1rem;
  423. color: #AAAAAA;
  424. }
  425. .ui.basic.fullscreen.modal > .close {
  426. color: #FFFFFF;
  427. }
  428. /*--------------
  429. Size
  430. ---------------*/
  431. .ui.modal {
  432. font-size: 1rem;
  433. }
  434. /* Mini */
  435. .ui.mini.modal > .header:not(.ui) {
  436. font-size: 1.3em;
  437. }
  438. /* Mini Modal Width */
  439. @media only screen and (max-width: 767.98px) {
  440. .ui.mini.modal {
  441. width: 95%;
  442. margin: 0 0 0 0;
  443. }
  444. }
  445. @media only screen and (min-width: 768px) {
  446. .ui.mini.modal {
  447. width: 35.2%;
  448. margin: 0 0 0 0;
  449. }
  450. }
  451. @media only screen and (min-width: 992px) {
  452. .ui.mini.modal {
  453. width: 340px;
  454. margin: 0 0 0 0;
  455. }
  456. }
  457. @media only screen and (min-width: 1200px) {
  458. .ui.mini.modal {
  459. width: 360px;
  460. margin: 0 0 0 0;
  461. }
  462. }
  463. @media only screen and (min-width: 1920px) {
  464. .ui.mini.modal {
  465. width: 380px;
  466. margin: 0 0 0 0;
  467. }
  468. }
  469. /* Tiny */
  470. .ui.tiny.modal > .header:not(.ui) {
  471. font-size: 1.3em;
  472. }
  473. /* Tiny Modal Width */
  474. @media only screen and (max-width: 767.98px) {
  475. .ui.tiny.modal {
  476. width: 95%;
  477. margin: 0 0 0 0;
  478. }
  479. }
  480. @media only screen and (min-width: 768px) {
  481. .ui.tiny.modal {
  482. width: 52.8%;
  483. margin: 0 0 0 0;
  484. }
  485. }
  486. @media only screen and (min-width: 992px) {
  487. .ui.tiny.modal {
  488. width: 510px;
  489. margin: 0 0 0 0;
  490. }
  491. }
  492. @media only screen and (min-width: 1200px) {
  493. .ui.tiny.modal {
  494. width: 540px;
  495. margin: 0 0 0 0;
  496. }
  497. }
  498. @media only screen and (min-width: 1920px) {
  499. .ui.tiny.modal {
  500. width: 570px;
  501. margin: 0 0 0 0;
  502. }
  503. }
  504. /* Small */
  505. .ui.small.modal > .header:not(.ui) {
  506. font-size: 1.3em;
  507. }
  508. /* Small Modal Width */
  509. @media only screen and (max-width: 767.98px) {
  510. .ui.small.modal {
  511. width: 95%;
  512. margin: 0 0 0 0;
  513. }
  514. }
  515. @media only screen and (min-width: 768px) {
  516. .ui.small.modal {
  517. width: 70.4%;
  518. margin: 0 0 0 0;
  519. }
  520. }
  521. @media only screen and (min-width: 992px) {
  522. .ui.small.modal {
  523. width: 680px;
  524. margin: 0 0 0 0;
  525. }
  526. }
  527. @media only screen and (min-width: 1200px) {
  528. .ui.small.modal {
  529. width: 720px;
  530. margin: 0 0 0 0;
  531. }
  532. }
  533. @media only screen and (min-width: 1920px) {
  534. .ui.small.modal {
  535. width: 760px;
  536. margin: 0 0 0 0;
  537. }
  538. }
  539. /* Large Modal Width */
  540. .ui.large.modal > .header {
  541. font-size: 1.6em;
  542. }
  543. @media only screen and (max-width: 767.98px) {
  544. .ui.large.modal {
  545. width: 95%;
  546. margin: 0 0 0 0;
  547. }
  548. }
  549. @media only screen and (min-width: 768px) {
  550. .ui.large.modal {
  551. width: 88%;
  552. margin: 0 0 0 0;
  553. }
  554. }
  555. @media only screen and (min-width: 992px) {
  556. .ui.large.modal {
  557. width: 1020px;
  558. margin: 0 0 0 0;
  559. }
  560. }
  561. @media only screen and (min-width: 1200px) {
  562. .ui.large.modal {
  563. width: 1080px;
  564. margin: 0 0 0 0;
  565. }
  566. }
  567. @media only screen and (min-width: 1920px) {
  568. .ui.large.modal {
  569. width: 1140px;
  570. margin: 0 0 0 0;
  571. }
  572. }
  573. /*****************************
  574. Inverted
  575. *******************************/
  576. .ui.inverted.modal {
  577. background: rgba(0, 0, 0, 0.9);
  578. }
  579. .ui.inverted.modal > .header,
  580. .ui.inverted.modal > .content {
  581. background: rgba(0, 0, 0, 0.9);
  582. color: #FFFFFF;
  583. }
  584. .ui.inverted.modal > .actions {
  585. background: #191A1B;
  586. border-top: 1px solid rgba(34, 36, 38, 0.85);
  587. color: #FFFFFF;
  588. }
  589. .ui.inverted.dimmer > .modal > .close {
  590. color: rgba(0, 0, 0, 0.85);
  591. }
  592. @media only screen and (max-width: 991.98px) {
  593. .ui.dimmer .inverted.modal > .close {
  594. color: #FFFFFF;
  595. }
  596. }
  597. .ui.inverted.fullscreen.modal > .close {
  598. color: #FFFFFF;
  599. }
  600. /*******************************
  601. Theme Overrides
  602. *******************************/
  603. /*******************************
  604. Site Overrides
  605. *******************************/