Modal.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @import "../css/variables.module";
  2. .excalidraw {
  3. &.excalidraw-modal-container {
  4. position: absolute;
  5. z-index: 10;
  6. }
  7. .Modal {
  8. position: absolute;
  9. top: 0;
  10. left: 0;
  11. right: 0;
  12. bottom: 0;
  13. display: flex;
  14. align-items: center;
  15. justify-content: center;
  16. overflow: auto;
  17. padding: calc(var(--space-factor) * 10);
  18. }
  19. .Modal__background {
  20. position: absolute;
  21. top: 0;
  22. left: 0;
  23. right: 0;
  24. bottom: 0;
  25. z-index: 1;
  26. background-color: transparentize($oc-black, 0.3);
  27. }
  28. .Modal__content {
  29. position: relative;
  30. z-index: 2;
  31. width: 100%;
  32. max-width: var(--max-width);
  33. max-height: 100%;
  34. opacity: 0;
  35. transform: translateY(10px);
  36. animation: Modal__content_fade-in 0.1s ease-out 0.05s forwards;
  37. position: relative;
  38. overflow-y: auto;
  39. // for modals, reset blurry bg
  40. background: var(--island-bg-color);
  41. border: 1px solid var(--dialog-border-color);
  42. box-shadow: 0 2px 10px transparentize($oc-black, 0.75);
  43. border-radius: 6px;
  44. box-sizing: border-box;
  45. &:focus {
  46. outline: none;
  47. }
  48. @include isMobile {
  49. max-width: 100%;
  50. border: 0;
  51. border-radius: 0;
  52. }
  53. }
  54. @keyframes Modal__content_fade-in {
  55. from {
  56. opacity: 0;
  57. transform: translateY(10px);
  58. }
  59. to {
  60. opacity: 1;
  61. transform: translateY(0);
  62. }
  63. }
  64. .Modal__close {
  65. width: calc(var(--space-factor) * 7);
  66. height: calc(var(--space-factor) * 7);
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. svg {
  71. height: calc(var(--space-factor) * 5);
  72. }
  73. }
  74. @include isMobile {
  75. .Modal {
  76. padding: 0;
  77. }
  78. .Modal__content {
  79. position: absolute;
  80. top: 0;
  81. left: 0;
  82. right: 0;
  83. bottom: 0;
  84. }
  85. }
  86. }