media.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. max-height: 530px;
  83. background-color: #101010;
  84. }
  85. .still-image {
  86. max-height: 379.5px;
  87. max-width: 533px;
  88. img {
  89. object-fit: cover;
  90. max-width: 100%;
  91. max-height: 379.5px;
  92. flex-basis: 300px;
  93. flex-grow: 1;
  94. }
  95. }
  96. .alt-text {
  97. margin: 0px;
  98. padding: 11px 7px;
  99. box-sizing: border-box;
  100. position: absolute;
  101. bottom: 10px;
  102. left: 10px;
  103. width: 2.98em;
  104. max-height: 25px;
  105. white-space: pre;
  106. overflow: hidden;
  107. border-radius: 10px;
  108. color: var(--fg_color);
  109. font-size: 12px;
  110. font-weight: bold;
  111. background: rgba(0, 0, 0, 0.5);
  112. backdrop-filter: blur(12px);
  113. }
  114. .alt-text:hover {
  115. padding: 7px;
  116. width: Min(230px, calc(100% - 10px * 2));
  117. max-height: calc(100% - 10px);
  118. line-height: 1.2em;
  119. white-space: pre-wrap;
  120. transition-duration: 0.4s;
  121. transition-property: max-height;
  122. }
  123. .overlay-circle {
  124. border-radius: 50%;
  125. background-color: var(--dark_grey);
  126. width: 40px;
  127. height: 40px;
  128. align-items: center;
  129. display: flex;
  130. border-width: 5px;
  131. border-color: var(--play_button);
  132. border-style: solid;
  133. }
  134. .overlay-triangle {
  135. width: 0;
  136. height: 0;
  137. border-style: solid;
  138. border-width: 12px 0 12px 17px;
  139. border-color: transparent transparent transparent var(--play_button);
  140. margin-left: 14px;
  141. }
  142. .media-body {
  143. flex: 1;
  144. padding: 0;
  145. white-space: pre-wrap;
  146. }