Make small images not scale up in image viewer (#1554)
authorJan Jurzitza <gh@webfreak.org>
Tue, 28 Nov 2023 14:52:20 +0000 (15:52 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 14:52:20 +0000 (20:22 +0530)
Instead show them in real resolution

src/app/components/image-viewer/ImageViewer.css.ts

index fc2f508841eae88d6aa51c3df9a60f820b956a31..d688afcb75dfbf727b3dedd235c104df08418cd7 100644 (file)
@@ -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',
   },