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.

Modal.css 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2022 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. .modal,
  21. .ReactModal__Content {
  22. position: fixed;
  23. z-index: var(--modalZIndex);
  24. top: 0;
  25. left: 50%;
  26. margin-left: -270px;
  27. width: 540px;
  28. background-color: #fff;
  29. opacity: 0;
  30. transition: all 0.2s ease;
  31. border-radius: 3px;
  32. }
  33. .modal:focus,
  34. .ReactModal__Content:focus {
  35. outline: none;
  36. }
  37. .modal.in,
  38. .ReactModal__Content--after-open {
  39. top: 15%;
  40. opacity: 1;
  41. }
  42. .modal-small {
  43. width: 450px;
  44. margin-left: -225px;
  45. }
  46. .modal-medium {
  47. width: 830px;
  48. margin-left: -415px;
  49. }
  50. .modal-large {
  51. width: calc(100% - 40px);
  52. max-width: 1280px;
  53. min-width: 1040px;
  54. margin-left: 0;
  55. transform: translateX(-50%);
  56. }
  57. .modal-overlay,
  58. .ReactModal__Overlay {
  59. position: fixed;
  60. z-index: var(--modalOverlayZIndex);
  61. top: 0;
  62. bottom: 0;
  63. left: 0;
  64. right: 0;
  65. background-color: rgba(0, 0, 0, 0.7);
  66. opacity: 0;
  67. transition: all 0.2s ease;
  68. }
  69. .modal-overlay.in,
  70. .ReactModal__Overlay--after-open {
  71. opacity: 1;
  72. }
  73. .modal-no-backdrop {
  74. background-color: transparent;
  75. }
  76. .modal-open,
  77. .ReactModal__Body--open {
  78. overflow: hidden;
  79. margin-right: var(--sbw);
  80. }
  81. .modal-head {
  82. padding: calc(4 * var(--gridSize));
  83. padding-bottom: 0;
  84. }
  85. .modal-head h1,
  86. .modal-head h2 {
  87. margin: 0;
  88. font-size: var(--bigFontSize);
  89. font-weight: bold;
  90. line-height: normal;
  91. overflow-wrap: break-word;
  92. }
  93. .modal-body {
  94. padding: var(--pagePadding) calc(4 * var(--gridSize));
  95. }
  96. .modal-container {
  97. max-height: 60vh;
  98. box-sizing: border-box;
  99. overflow-y: auto;
  100. border-top: 1px solid var(--barBorderColor);
  101. margin-top: var(--pagePadding);
  102. padding-right: calc(4 * var(--gridSize));
  103. }
  104. .modal-container > :last-child {
  105. margin-bottom: var(--pagePadding);
  106. }
  107. .modal-field,
  108. .modal-validation-field {
  109. clear: both;
  110. display: block;
  111. padding: 0;
  112. margin-bottom: calc(var(--gridSize) * 2);
  113. }
  114. .modal-field label,
  115. .modal-validation-field label,
  116. .modal-field legend {
  117. display: block;
  118. font-weight: bold;
  119. padding-bottom: calc(var(--gridSize) / 2);
  120. }
  121. .modal-field a.icon-checkbox,
  122. .modal-field input,
  123. .modal-field select,
  124. .modal-field textarea,
  125. .modal-field .Select {
  126. margin-right: 5px;
  127. }
  128. .modal-field a.icon-checkbox {
  129. height: 24px;
  130. }
  131. .modal-field input[type='radio'],
  132. .modal-field input[type='checkbox'] {
  133. margin-top: 5px;
  134. margin-bottom: 4px;
  135. }
  136. .modal-field > .icon-checkbox {
  137. padding-top: 6px;
  138. padding-right: 8px;
  139. }
  140. .modal-field input[type='text'],
  141. .modal-field input[type='email'],
  142. .modal-field input[type='password'],
  143. .modal-field textarea,
  144. .modal-field select,
  145. .modal-field .Select {
  146. width: 100%;
  147. }
  148. .modal-validation-field input,
  149. .modal-validation-field textarea,
  150. .modal-validation-field .Select {
  151. margin-right: var(--gridSize);
  152. margin-bottom: 2px;
  153. width: calc(100% - 3 * var(--gridSize));
  154. }
  155. .modal-field textarea,
  156. .modal-validation-field textarea {
  157. max-width: 100%;
  158. min-width: 100%;
  159. max-height: 50vh;
  160. min-height: var(--controlHeight);
  161. }
  162. .modal-validation-field input:not(.is-invalid),
  163. .modal-validation-field .Select:not(.is-invalid) {
  164. margin-bottom: calc(var(--tinyControlHeight) + 2px);
  165. }
  166. .modal-field-description {
  167. line-height: 1.4;
  168. color: var(--secondFontColor);
  169. font-size: var(--smallFontSize);
  170. overflow: hidden;
  171. text-overflow: ellipsis;
  172. margin-top: 2px;
  173. }
  174. .modal-foot {
  175. padding: var(--pagePadding) calc(4 * var(--gridSize));
  176. border-top: 1px solid var(--barBorderColor);
  177. background-color: var(--barBackgroundColor);
  178. border-radius: 3px;
  179. text-align: right;
  180. }
  181. .modal-foot button,
  182. .modal-foot .button,
  183. .modal-foot input[type='submit'],
  184. .modal-foot input[type='button'] {
  185. margin-left: var(--gridSize);
  186. }
  187. .modal-foot button:first-of-type,
  188. .modal-foot .button:first-of-type,
  189. .modal-foot input[type='submit']:first-of-type,
  190. .modal-foot input[type='button']:first-of-type {
  191. margin-left: 0;
  192. }
  193. .modal-foot-clear {
  194. border-top: 0;
  195. background-color: transparent;
  196. }