about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-03-11 15:12:33 +0100
committerGitHub <noreply@github.com>2018-03-11 15:12:33 +0100
commit56eb5c3f344f0342ac6f26a05748bc21c585a729 (patch)
tree257c77162f7e36466ab8fb33b971991c8fed189d /app/javascript/styles
parent56333cca88325b492861fe218d993d8a56acf575 (diff)
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
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/mastodon/components.scss18
1 files changed, 15 insertions, 3 deletions
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;