_modal.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. // Modals
  2. .modal {
  3. // Modal Header
  4. .modal-header {
  5. background-color: $body-bg;
  6. border-radius: .42rem;
  7. padding: .8rem;
  8. border-bottom: none;
  9. // close button
  10. .close {
  11. padding: .2rem .62rem;
  12. box-shadow: 0 5px 20px 0 rgba($pure-black, .1);
  13. border-radius: .357rem;
  14. background: $white;
  15. opacity: 1;
  16. transition: all .23s ease .1s;
  17. position: relative;
  18. transform: translate(8px, -2px);
  19. span{
  20. font-weight: 400;
  21. font-size: 2rem;
  22. color: $primary;
  23. }
  24. // For hover effect of close btn
  25. &:hover,
  26. &:focus,&:active {
  27. opacity: 1;
  28. outline: none;
  29. transform: translate(5px, 3px);
  30. box-shadow: none;
  31. }
  32. }
  33. &[class*="bg-"]{
  34. color: $white;
  35. border-bottom-left-radius: 5px;
  36. border-bottom-right-radius: 5px;
  37. .modal-title {
  38. color: $white;
  39. }
  40. }
  41. // Themed Modals
  42. &.bg-primary {
  43. .close {
  44. span {
  45. color: $primary;
  46. }
  47. }
  48. }
  49. &.bg-success {
  50. .close {
  51. span {
  52. color: $success;
  53. }
  54. }
  55. }
  56. &.bg-info {
  57. .close {
  58. span {
  59. color: $info;
  60. }
  61. }
  62. }
  63. &.bg-danger {
  64. .close {
  65. span {
  66. color: $danger;
  67. }
  68. }
  69. }
  70. &.bg-warning {
  71. .close {
  72. span {
  73. color: $warning;
  74. }
  75. }
  76. }
  77. &.bg-dark {
  78. .close {
  79. span {
  80. color: $dark;
  81. }
  82. }
  83. }
  84. }
  85. // Modal Content
  86. .modal-content {
  87. border: none;
  88. // overflow: unset; updated to "visible" as close icon is not visible in IE
  89. overflow: visible;
  90. box-shadow: 0 5px 20px 0 rgba($pure-black, .1);
  91. }
  92. // Modal Footer
  93. .modal-footer {
  94. border-color: rgba($pure-black, .05);
  95. }
  96. }
  97. // Modal SM
  98. .modal-sm {
  99. max-width: 400px;
  100. }
  101. // Modal XS
  102. .modal-xs {
  103. max-width: 300px;
  104. }
  105. // Modal XL
  106. .modal-xl {
  107. max-width: 94%;
  108. margin-left: 3%;
  109. margin-right: 3%;
  110. }
  111. // To remove Max-width of XS Modal in Small Screen
  112. @media(max-width:576px) {
  113. .modal {
  114. padding-right: 1rem;
  115. padding-left: 1rem;
  116. .modal-xs,
  117. .modal-sm {
  118. max-width: unset;
  119. }
  120. }
  121. }