_add-multiple.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. @use 'sass:color';
  2. .replace-file-input {
  3. display: inline-block;
  4. position: relative;
  5. overflow: hidden;
  6. padding-bottom: 2px;
  7. [type='file'] {
  8. padding: 0;
  9. opacity: 0;
  10. position: absolute;
  11. top: 0;
  12. inset-inline-end: 0;
  13. direction: ltr;
  14. width: auto;
  15. display: block;
  16. font-size: 5em;
  17. &:hover {
  18. cursor: pointer;
  19. }
  20. }
  21. &:hover {
  22. cursor: pointer;
  23. button {
  24. background-color: theme('colors.surface-button-hover');
  25. }
  26. }
  27. }
  28. .upload-list {
  29. > li {
  30. padding: 1em;
  31. }
  32. .left {
  33. text-align: center;
  34. word-break: break-all;
  35. }
  36. .preview {
  37. width: 150px;
  38. min-height: 150px;
  39. display: block;
  40. position: relative;
  41. text-align: center;
  42. max-width: 100%;
  43. margin: auto;
  44. }
  45. .progress,
  46. .thumb,
  47. .thumb .icon,
  48. canvas,
  49. img {
  50. position: absolute;
  51. max-width: 100%;
  52. }
  53. .progress {
  54. box-shadow: 0 0 5px 2px theme('colors.white-50');
  55. z-index: 4;
  56. top: 60%;
  57. inset-inline-start: 20%;
  58. inset-inline-end: 20%;
  59. width: 60%;
  60. }
  61. .thumb {
  62. top: 0;
  63. inset-inline-end: 0;
  64. bottom: 0;
  65. inset-inline-start: 0;
  66. z-index: 1;
  67. width: 100%;
  68. }
  69. .thumb .icon,
  70. canvas,
  71. img {
  72. inset-inline-start: 0;
  73. inset-inline-end: 0;
  74. top: 0;
  75. bottom: 0;
  76. margin: auto;
  77. }
  78. .thumb .icon {
  79. z-index: 2;
  80. top: 0;
  81. width: 1em;
  82. font-size: 10em;
  83. line-height: 1.4em;
  84. color: theme('colors.icon-secondary');
  85. }
  86. canvas,
  87. img {
  88. z-index: 3;
  89. }
  90. .hasthumb {
  91. .icon {
  92. display: none;
  93. }
  94. }
  95. .status-msg {
  96. display: none;
  97. }
  98. .upload-complete {
  99. .progress {
  100. opacity: 0;
  101. }
  102. }
  103. .upload-success {
  104. .status-msg.success {
  105. display: block;
  106. }
  107. }
  108. .upload-duplicate {
  109. display: flex;
  110. align-items: center;
  111. .status-msg.warning {
  112. display: block;
  113. }
  114. }
  115. .upload-failure {
  116. border-color: theme('colors.critical.200');
  117. .preview {
  118. display: none;
  119. }
  120. .status-msg.failure {
  121. display: block;
  122. }
  123. }
  124. .upload-server-error {
  125. border-color: theme('colors.critical.200');
  126. .preview {
  127. display: none;
  128. }
  129. .status-msg.server-error {
  130. display: block;
  131. }
  132. }
  133. }
  134. .confirm-duplicate-upload {
  135. display: flex;
  136. flex-direction: column;
  137. align-items: center;
  138. figure {
  139. display: flex;
  140. flex-direction: column;
  141. align-items: center;
  142. margin: 1rem auto;
  143. img {
  144. position: relative;
  145. }
  146. }
  147. form {
  148. display: inline;
  149. }
  150. }