Modal.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. .Island {
  19. padding: 2.5rem !important;
  20. }
  21. }
  22. .Modal__background {
  23. position: absolute;
  24. top: 0;
  25. left: 0;
  26. right: 0;
  27. bottom: 0;
  28. z-index: 1;
  29. background-color: rgba(#121212, 0.2);
  30. }
  31. .Modal__content {
  32. position: relative;
  33. z-index: 2;
  34. width: 100%;
  35. max-width: var(--max-width);
  36. max-height: 100%;
  37. opacity: 0;
  38. transform: translateY(10px);
  39. animation: Modal__content_fade-in 0.1s ease-out 0.05s forwards;
  40. position: relative;
  41. overflow-y: auto;
  42. // for modals, reset blurry bg
  43. background: var(--island-bg-color);
  44. border: 1px solid var(--dialog-border-color);
  45. box-shadow: var(--modal-shadow);
  46. border-radius: 6px;
  47. box-sizing: border-box;
  48. &:focus {
  49. outline: none;
  50. }
  51. @include isMobile {
  52. max-width: 100%;
  53. border: 0;
  54. border-radius: 0;
  55. }
  56. }
  57. @keyframes Modal__content_fade-in {
  58. from {
  59. opacity: 0;
  60. transform: translateY(10px);
  61. }
  62. to {
  63. opacity: 1;
  64. transform: translateY(0);
  65. }
  66. }
  67. .Modal__close {
  68. color: var(--icon-fill-color);
  69. margin: 0;
  70. padding: 0.375rem;
  71. position: absolute;
  72. top: 1rem;
  73. right: 1rem;
  74. border: 0;
  75. background-color: transparent;
  76. line-height: 0;
  77. cursor: pointer;
  78. svg {
  79. width: 1.5rem;
  80. height: 1.5rem;
  81. }
  82. }
  83. @include isMobile {
  84. .Modal {
  85. padding: 0;
  86. }
  87. .Modal__content {
  88. position: absolute;
  89. top: 0;
  90. left: 0;
  91. right: 0;
  92. bottom: 0;
  93. }
  94. }
  95. }