dialog.css 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* Styling for the popups */
  2. dialog {
  3. flex-direction: column;
  4. align-items: center;
  5. justify-content: center;
  6. width: 70vw;
  7. height: 70vh;
  8. margin: auto;
  9. margin-top: 23rem;
  10. background: var(--popup-background-color);
  11. border: none;
  12. border-radius: 0.8rem;
  13. @media screen and (max-width: 800px) {
  14. position: fixed;
  15. top: 0;
  16. left: 0;
  17. right: 0;
  18. bottom: 0;
  19. max-width: 100vw; /* We need these overrides of browser defaults*/
  20. max-height: 100vh;
  21. width: auto;
  22. height: auto;
  23. margin: 0;
  24. }
  25. animation: fade-out 0.3s ease-out;
  26. &[open] {
  27. display: flex;
  28. animation: fade-in 0.3s ease-out;
  29. }
  30. & > .close-dialog {
  31. display: flex;
  32. align-items: center;
  33. justify-content: center;
  34. width: 4rem;
  35. height: 4rem;
  36. position: absolute;
  37. top: 3rem;
  38. right: 3rem;
  39. cursor: pointer;
  40. }
  41. & > section {
  42. max-width: 800px;
  43. overflow-y: auto;
  44. margin: 4rem 2rem 2rem 4rem;
  45. padding: 0 2rem 0 0;
  46. & h1,
  47. & h2 {
  48. margin: 3rem 0 2rem 0;
  49. font-size: 3.6rem;
  50. font-weight: 400;
  51. letter-spacing: -0.2rem;
  52. color: var(--primary-text-color);
  53. }
  54. & h2 {
  55. margin: 2rem 0 1rem 0;
  56. font-size: 2.5rem;
  57. }
  58. & p,
  59. & li {
  60. margin: 1rem 0 1rem 0;
  61. font-size: 1.6rem;
  62. line-height: 2.5rem;
  63. font-weight: 400;
  64. letter-spacing: -0.1rem;
  65. color: var(--secondary-text-color);
  66. }
  67. & ul {
  68. list-style-position: inside;
  69. margin: 1rem;
  70. & li {
  71. margin: 0.1rem 0;
  72. }
  73. }
  74. & a {
  75. font-size: 1.6rem;
  76. font-weight: 700;
  77. letter-spacing: -0.1rem;
  78. color: var(--secondary-text-color);
  79. text-underline-offset: 0.3rem;
  80. transition: text-underline-offset 0.2s;
  81. &:hover {
  82. color: var(--theme-green);
  83. text-underline-offset: 0.5rem;
  84. }
  85. }
  86. }
  87. }
  88. @keyframes fade-in {
  89. 0% {
  90. opacity: 0;
  91. transform: scale(0.6);
  92. display: none;
  93. }
  94. 0.1% {
  95. display: flex;
  96. }
  97. 100% {
  98. opacity: 1;
  99. transform: scale(1);
  100. display: flex;
  101. }
  102. }
  103. @keyframes fade-out {
  104. 0% {
  105. opacity: 1;
  106. transform: scale(1);
  107. display: flex;
  108. }
  109. 99.9% {
  110. display: flex;
  111. }
  112. 100% {
  113. opacity: 0;
  114. transform: scale(0.6);
  115. display: none;
  116. }
  117. }