Modal.scss 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @import "../_variables";
  2. .Modal {
  3. position: fixed;
  4. top: 0;
  5. left: 0;
  6. right: 0;
  7. bottom: 0;
  8. display: flex;
  9. align-items: center;
  10. justify-content: center;
  11. overflow: auto;
  12. padding: calc(var(--space-factor) * 10);
  13. }
  14. .Modal__background {
  15. position: fixed;
  16. top: 0;
  17. left: 0;
  18. right: 0;
  19. bottom: 0;
  20. z-index: 1;
  21. background-color: rgba(0, 0, 0, 0.3);
  22. backdrop-filter: blur(2px);
  23. }
  24. .Modal__content {
  25. position: relative;
  26. z-index: 2;
  27. width: 100%;
  28. max-width: 100%;
  29. opacity: 0;
  30. transform: translateY(10px);
  31. animation: Modal__content_fade-in 0.1s ease-out 0.05s forwards;
  32. position: relative;
  33. }
  34. @keyframes Modal__content_fade-in {
  35. from {
  36. opacity: 0;
  37. transform: translateY(10px);
  38. }
  39. to {
  40. opacity: 1;
  41. transform: translateY(0);
  42. }
  43. }
  44. .Modal__close {
  45. width: calc(var(--space-factor) * 7);
  46. height: calc(var(--space-factor) * 7);
  47. display: flex;
  48. align-items: center;
  49. justify-content: center;
  50. svg {
  51. height: calc(var(--space-factor) * 5);
  52. }
  53. }
  54. .Modal__close--floating {
  55. position: absolute;
  56. right: calc(var(--space-factor) * 5);
  57. top: calc(var(--space-factor) * 5);
  58. }
  59. @media #{$media-query} {
  60. .Modal {
  61. padding: 0;
  62. }
  63. .Modal__content {
  64. position: fixed;
  65. top: 0;
  66. left: 0;
  67. right: 0;
  68. bottom: 0;
  69. }
  70. }