_modals.scss 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Modals
  2. .modal {
  3. align-items: center;
  4. bottom: 0;
  5. display: none;
  6. justify-content: center;
  7. left: 0;
  8. opacity: 0;
  9. overflow: hidden;
  10. padding: $layout-spacing;
  11. position: fixed;
  12. right: 0;
  13. top: 0;
  14. &:target,
  15. &.active {
  16. display: flex;
  17. opacity: 1;
  18. z-index: $zindex-4;
  19. .modal-overlay {
  20. background: rgba($bg-color, .75);
  21. bottom: 0;
  22. cursor: default;
  23. display: block;
  24. left: 0;
  25. position: absolute;
  26. right: 0;
  27. top: 0;
  28. }
  29. .modal-container {
  30. animation: slide-down .2s ease 1;
  31. z-index: $zindex-0;
  32. }
  33. }
  34. &.modal-sm {
  35. .modal-container {
  36. max-width: $control-width-sm;
  37. padding: 0 $unit-2;
  38. }
  39. }
  40. &.modal-lg {
  41. .modal-overlay {
  42. background: $bg-color-light;
  43. }
  44. .modal-container {
  45. box-shadow: none;
  46. max-width: $control-width-lg;
  47. }
  48. }
  49. }
  50. .modal-container {
  51. @include shadow-variant(.2rem);
  52. background: $bg-color-light;
  53. border-radius: $border-radius;
  54. display: flex;
  55. flex-direction: column;
  56. max-height: 75vh;
  57. max-width: $control-width-md;
  58. padding: 0 $unit-4;
  59. width: 100%;
  60. &.modal-fullheight {
  61. max-height: 100vh;
  62. }
  63. .modal-header {
  64. color: $dark-color;
  65. padding: $unit-4;
  66. }
  67. .modal-body {
  68. overflow-y: auto;
  69. padding: $unit-4;
  70. position: relative;
  71. }
  72. .modal-footer {
  73. padding: $unit-4;
  74. text-align: right;
  75. }
  76. }