UX: fix cropped image thumbnails

UX: fix cropped image thumbnails
From 2ee2e5c98175a4d46435c165602152e6d3d56473 Mon Sep 17 00:00:00 2001
From: Maja Komel <maja.komel@gmail.com>
Date: Tue, 11 Dec 2018 12:23:39 +0100
Subject: [PATCH] UX: fix cropped image thumbnails


diff --git a/app/assets/stylesheets/common/base/lightbox.scss b/app/assets/stylesheets/common/base/lightbox.scss
index 03aefba..db6e3ca 100644
--- a/app/assets/stylesheets/common/base/lightbox.scss
+++ b/app/assets/stylesheets/common/base/lightbox.scss
@@ -10,6 +10,10 @@
 
 .lightbox-wrapper {
   display: inline-block;
+  img {
+    object-fit: cover;
+    object-position: top;
+  }
   &,
   * {
     outline: 0;

GitHub

2 Likes

Note @hnb-ku mentioned this will not work in ie11, but I think this is ok, it really is just a mild quality of life improvement for rare cases

@awesomerobot are you good with this ?

2 Likes

Yep, this looks like a worthwhile trade-off to me.

3 Likes