modal.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. //@import '../theme/variables.scss';
  2. @import "./variables.scss";
  3. $module: #{$prefix}-modal;
  4. .#{$module} {
  5. @include font-size-regular;
  6. position: relative;
  7. // width: 600px;
  8. margin: $spacing-modal-marginY $spacing-modal-marginX;
  9. &-mask {
  10. position: fixed;
  11. top: $spacing-modal_mask-top;
  12. right: $spacing-modal_mask-right;
  13. left: $spacing-modal_mask-left;
  14. bottom: $spacing-modal_mask-bottom;
  15. background-color: $color-modal_mask-bg;
  16. height: 100%;
  17. // filter: alpha(opacity=50);
  18. z-index: $z-modal-mask;
  19. &-hidden {
  20. display: none;
  21. }
  22. }
  23. &-icon-wrapper {
  24. display: inline-flex;
  25. margin-right: $spacing-modal_icon_wrapper-marginRight;
  26. width: $width-icon-extra-large;
  27. }
  28. &-wrap {
  29. position: fixed;
  30. overflow: auto;
  31. top: $spacing-modal_wrap-top;
  32. right: $spacing-modal_wrap-right;
  33. bottom: $spacing-modal_wrap-bottom;
  34. left: $spacing-modal_wrap-left;
  35. z-index: $z-modal;
  36. -webkit-overflow-scrolling: touch;
  37. outline: 0;
  38. }
  39. &-title {
  40. display: inline-flex;
  41. align-items: flex-start;
  42. justify-content: flex-start;
  43. width: $width-modal_title;
  44. margin: $spacing-modal_title-margin;
  45. }
  46. &-content {
  47. position: relative;
  48. display: flex;
  49. height: $height-modal_content;
  50. width: $width-modal_content;
  51. box-sizing: border-box;
  52. flex-direction: column;
  53. background-color: $color-modal-bg;
  54. border: $width-modal_content-border solid $color-modal_content-border;
  55. border-radius: $radius-modal_content;
  56. padding: $spacing-modal_content-paddingY $spacing-modal_content-paddingX;
  57. background-clip: padding-box;
  58. overflow: hidden;
  59. @include shadow-elevated;
  60. }
  61. &-content-fullScreen {
  62. border-radius: $radius-modal_content_fullscreen;
  63. border: none;
  64. }
  65. // &-close {
  66. // position: absolute;
  67. // right: 15px;
  68. // }
  69. &-header {
  70. display: flex;
  71. align-items: flex-start;
  72. margin: $spacing-modal_header-marginY $spacing-modal_header-marginX;
  73. padding: $spacing-modal_header-paddingY $spacing-modal_header-paddingX;
  74. font-size: $font-modal_header-fontSize;
  75. font-weight: $font-modal_header-fontWeight;
  76. color: $color-modal_main-text;
  77. border-bottom: $width-modal_header-border solid $color-modal_header-border;
  78. }
  79. &-body-wrapper {
  80. display: flex;
  81. align-items: flex-start;
  82. margin: $spacing-modal_body_wrapper-marginY $spacing-modal_body_wrapper-marginX;
  83. }
  84. &-body {
  85. flex: 1 1 auto;
  86. // padding: $spacing-loose;
  87. margin: $spacing-modal_body-margin;
  88. padding: $spacing-modal_body-padding;
  89. }
  90. &-withIcon {
  91. margin-left: $spacing-modal_content_withicon-marginLeft;
  92. }
  93. &-footer {
  94. // padding: $spacing-loose;
  95. margin: $spacing-modal_footer-marginY $spacing-modal_footer-marginX;
  96. padding: $spacing-modal_footer-paddingY $spacing-modal_footer-paddingX;
  97. text-align: right;
  98. border-radius: $radius-modal_footer;
  99. border-top: $width-modal_footer-border solid $color-modal_footer-border;
  100. .#{$prefix}-button {
  101. margin-left: $spacing-modal_footer_button-marginLeft;
  102. margin-right: 0;
  103. }
  104. }
  105. &-confirm {
  106. .#{$module}-header {
  107. margin-bottom: $spacing-modal_confirm_header-marginBottom;
  108. }
  109. // &-content-withIcon {
  110. // margin-left: 36px;
  111. // }
  112. &-icon-wrapper {
  113. display: inline-flex;
  114. margin-right: $spacing-modal_confirm_icon_wrapper-marginRight;
  115. width: $width-icon-extra-large;
  116. }
  117. &-icon {
  118. display: inline-flex;
  119. color: $color-modal_primary-icon;
  120. }
  121. }
  122. &-info-icon {
  123. color: $color-modal_info-icon;
  124. }
  125. &-success-icon {
  126. color: $color-modal_success-icon;
  127. }
  128. &-error-icon {
  129. color: $color-modal_danger-icon;
  130. }
  131. &-warning-icon {
  132. color: $color-modal_warning-icon;
  133. }
  134. &-small {
  135. width: $width-modal_small;
  136. }
  137. &-medium {
  138. width: $width-modal_medium;
  139. }
  140. &-large {
  141. width: $width-modal_large;
  142. }
  143. &-full-width {
  144. width: $width-modal_full_width;
  145. }
  146. }
  147. .#{$module}-centered {
  148. margin: 0 auto;
  149. }
  150. .#{$module}-popup {
  151. .#{$module}-mask,
  152. .#{$module}-wrap {
  153. position: absolute;
  154. overflow: hidden;
  155. }
  156. }
  157. .#{$module}-fixed {
  158. .#{$module}-mask,
  159. .#{$module}-wrap {
  160. position: fixed;
  161. overflow: hidden;
  162. }
  163. }
  164. .#{$module}-hidden {
  165. display: none;
  166. }
  167. @import "./rtl.scss";