Somehow this kinda works
This commit is contained in:
parent
72ff229dfb
commit
c30eaee4e2
|
@ -121,7 +121,6 @@ function Media({ media, to, showOriginal, autoAnimate, onClick = () => {} }) {
|
|||
'--height': `${height}px`,
|
||||
aspectRatio: `${width} / ${height}`,
|
||||
};
|
||||
const fixedWidth = width > height * 2;
|
||||
|
||||
if (isImage) {
|
||||
// Note: type: unknown might not have width/height
|
||||
|
@ -143,7 +142,7 @@ function Media({ media, to, showOriginal, autoAnimate, onClick = () => {} }) {
|
|||
return (
|
||||
<Parent
|
||||
ref={parentRef}
|
||||
class={`media media-image ${fixedWidth ? 'media-fixed-width' : ''}`}
|
||||
class={`media media-image`}
|
||||
onClick={onClick}
|
||||
data-orientation={orientation}
|
||||
style={
|
||||
|
@ -245,7 +244,7 @@ function Media({ media, to, showOriginal, autoAnimate, onClick = () => {} }) {
|
|||
<Parent
|
||||
class={`media media-${isGIF ? 'gif' : 'video'} ${
|
||||
autoGIFAnimate ? 'media-contain' : ''
|
||||
} ${fixedWidth ? 'media-fixed-width' : ''}`}
|
||||
}`}
|
||||
data-orientation={orientation}
|
||||
data-formatted-duration={formattedDuration}
|
||||
data-label={isGIF && !showOriginal && !autoGIFAnimate ? 'GIF' : ''}
|
||||
|
|
|
@ -597,15 +597,10 @@
|
|||
display: inline-block;
|
||||
max-width: 100% !important;
|
||||
min-width: 44px;
|
||||
width: auto;
|
||||
/* width: auto; */
|
||||
min-height: 44px;
|
||||
/* width: min(var(--width), 100%); */
|
||||
/* max-height: min(var(--height), 33vh); */
|
||||
height: min(160px, var(--height), 33vh);
|
||||
}
|
||||
.status .media-container.media-eq1 .media.media-fixed-width {
|
||||
width: min(var(--width), 100%);
|
||||
height: auto;
|
||||
width: min(fit-content, 100%);
|
||||
max-height: min(var(--height), 33vh);
|
||||
}
|
||||
.status .media-container.media-eq1 .media[data-orientation='portrait'] {
|
||||
|
|
Loading…
Reference in a new issue