media.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. @import "_variables";
  2. .gallery-row {
  3. display: flex;
  4. flex-direction: row;
  5. flex-wrap: nowrap;
  6. overflow: hidden;
  7. flex-grow: 1;
  8. max-height: 379.5px;
  9. max-width: 533px;
  10. pointer-events: all;
  11. &.mixed-row {
  12. .attachment {
  13. min-width: 0;
  14. min-height: 0;
  15. flex: 1 1 0;
  16. max-height: 379.5px;
  17. display: flex;
  18. align-items: center;
  19. justify-content: center;
  20. background-color: #101010;
  21. }
  22. .still-image,
  23. .still-image img,
  24. .attachment > video,
  25. .attachment > img {
  26. width: 100%;
  27. height: 100%;
  28. max-width: none;
  29. max-height: none;
  30. }
  31. .still-image {
  32. display: flex;
  33. align-self: stretch;
  34. }
  35. .still-image img {
  36. flex-basis: auto;
  37. flex-grow: 0;
  38. object-fit: cover;
  39. }
  40. .attachment > video,
  41. .attachment > img {
  42. object-fit: cover;
  43. }
  44. .attachment > video {
  45. object-fit: contain;
  46. }
  47. }
  48. }
  49. .attachments {
  50. margin-top: 0.35em;
  51. display: flex;
  52. flex-direction: row;
  53. width: 100%;
  54. max-height: 600px;
  55. border-radius: 7px;
  56. overflow: hidden;
  57. flex-flow: column;
  58. background-color: var(--bg_color);
  59. align-items: center;
  60. pointer-events: all;
  61. }
  62. .attachment {
  63. position: relative;
  64. line-height: 0;
  65. overflow: hidden;
  66. margin: 0 0.25em 0 0;
  67. flex-grow: 1;
  68. box-sizing: border-box;
  69. min-width: 2em;
  70. &:last-child {
  71. margin: 0;
  72. max-height: 530px;
  73. }
  74. }
  75. .media-gif {
  76. display: table;
  77. background-color: unset;
  78. width: unset;
  79. max-height: unset;
  80. }
  81. .media-gif video,
  82. .media-gif img {
  83. width: 100%;
  84. height: 100%;
  85. max-height: 530px;
  86. background-color: #101010;
  87. }
  88. .still-image {
  89. max-height: 379.5px;
  90. max-width: 533px;
  91. img {
  92. object-fit: cover;
  93. max-width: 100%;
  94. max-height: 379.5px;
  95. flex-basis: 300px;
  96. flex-grow: 1;
  97. }
  98. }
  99. .alt-text {
  100. margin: 0px;
  101. padding: 11px 7px;
  102. box-sizing: border-box;
  103. position: absolute;
  104. bottom: 10px;
  105. left: 10px;
  106. width: 2.98em;
  107. max-height: 25px;
  108. white-space: pre;
  109. overflow: hidden;
  110. border-radius: 10px;
  111. color: var(--fg_color);
  112. font-size: 12px;
  113. font-weight: bold;
  114. background: rgba(0, 0, 0, 0.5);
  115. backdrop-filter: blur(12px);
  116. }
  117. .alt-text:hover {
  118. padding: 7px;
  119. width: Min(230px, calc(100% - 10px * 2));
  120. max-height: calc(100% - 10px);
  121. line-height: 1.2em;
  122. white-space: pre-wrap;
  123. transition-duration: 0.4s;
  124. transition-property: max-height;
  125. }
  126. .overlay-circle {
  127. border-radius: 50%;
  128. background-color: var(--dark_grey);
  129. width: 40px;
  130. height: 40px;
  131. align-items: center;
  132. display: flex;
  133. border-width: 5px;
  134. border-color: var(--play_button);
  135. border-style: solid;
  136. }
  137. .overlay-triangle {
  138. width: 0;
  139. height: 0;
  140. border-style: solid;
  141. border-width: 12px 0 12px 17px;
  142. border-color: transparent transparent transparent var(--play_button);
  143. margin-left: 14px;
  144. }
  145. .media-body {
  146. flex: 1;
  147. padding: 0;
  148. white-space: pre-wrap;
  149. }