From 56eb5c3f344f0342ac6f26a05748bc21c585a729 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 11 Mar 2018 15:12:33 +0100 Subject: Fix focal point cropping in MediaGallery, fix focal point modal (#6740) * Use object-position with object-fit instead of JS top/left * Fix focal point modal --- app/javascript/styles/mastodon/components.scss | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 1f3fb0fcd..93faff8b6 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4315,18 +4315,16 @@ a.status-card { display: block; text-decoration: none; color: $ui-secondary-color; - height: 100%; line-height: 0; &, img { + height: 100%; width: 100%; } img { - position: relative; object-fit: cover; - height: auto; } } @@ -5076,6 +5074,12 @@ noscript { } } +.focal-point-modal { + max-width: 80vw; + max-height: 80vh; + position: relative; +} + .focal-point { position: relative; cursor: pointer; @@ -5085,6 +5089,14 @@ noscript { cursor: move; } + img { + max-width: 80vw; + max-height: 80vh; + width: auto; + height: auto; + margin: auto; + } + &__reticle { position: absolute; width: 100px; -- cgit