From 3052f1790c5b713280962f3e25ad1c000699a604 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Thu, 22 Sep 2022 07:55:15 +0300 Subject: [PATCH] Fix image preview (#2276) Signed-off-by: Alexander Platov --- .../src/components/AttachmentPreview.svelte | 7 +++++-- .../src/components/AttachmentStyledBox.svelte | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/attachment-resources/src/components/AttachmentPreview.svelte b/plugins/attachment-resources/src/components/AttachmentPreview.svelte index c53ace454d..a74d560448 100644 --- a/plugins/attachment-resources/src/components/AttachmentPreview.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPreview.svelte @@ -121,8 +121,11 @@ max-width: 20rem; max-height: 20rem; border-radius: 0.75rem; - width: 100%; - height: 100%; + width: auto; + height: auto; + } + img { + object-fit: contain; } } diff --git a/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte b/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte index e709a1c398..df0701636f 100644 --- a/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte +++ b/plugins/attachment-resources/src/components/AttachmentStyledBox.svelte @@ -217,8 +217,7 @@ overflow-y: hidden; background-color: var(--accent-bg-color); border: 1px solid var(--divider-color); - border-radius: 0.5rem 0.5rem 0 0; - border-bottom: none; + border-radius: 0.5rem; .item + .item { padding-left: 1rem;