From 2889a72b8171191b98eb3e4ef7bf98a2ba3b8781 Mon Sep 17 00:00:00 2001 From: Jan Jurzitza Date: Tue, 28 Nov 2023 15:52:20 +0100 Subject: [PATCH] Make small images not scale up in image viewer (#1554) Instead show them in real resolution --- src/app/components/image-viewer/ImageViewer.css.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/image-viewer/ImageViewer.css.ts b/src/app/components/image-viewer/ImageViewer.css.ts index fc2f508..d688afc 100644 --- a/src/app/components/image-viewer/ImageViewer.css.ts +++ b/src/app/components/image-viewer/ImageViewer.css.ts @@ -32,8 +32,10 @@ export const ImageViewerImg = style([ DefaultReset, { objectFit: 'contain', - width: '100%', - height: '100%', + width: 'auto', + height: 'auto', + maxWidth: '100%', + maxHeight: '100%', backgroundColor: color.Surface.Container, transition: 'transform 100ms linear', },