]> Untitled Git - lemmy-ui.git/commitdiff
add .img-cover class, implement
authorAlec Armbruster <alectrocute@gmail.com>
Mon, 12 Jun 2023 17:00:18 +0000 (13:00 -0400)
committerAlec Armbruster <alectrocute@gmail.com>
Mon, 12 Jun 2023 17:00:18 +0000 (13:00 -0400)
src/assets/css/main.css
src/shared/components/common/pictrs-image.tsx

index a0d723940c9d0a136e40aa26df49676bd86f4343..1c45341d53d21016b3110b7ea66cf7a54d971cb8 100644 (file)
@@ -270,6 +270,10 @@ hr {
   -ms-filter: blur(10px);
 }
 
+.img-cover {
+  object-fit: cover;
+}
+
 .img-expanded {
   max-height: 90vh;
 }
index 6b9db5656d46781ccf7a6164430360d3704e73d1..91e4a18b0bcdb0c37190ca6ba3cf62c77773b55a 100644 (file)
@@ -38,8 +38,8 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
             "img-expanded slight-radius":
               !this.props.thumbnail && !this.props.icon,
             "img-blur": this.props.thumbnail && this.props.nsfw,
-            "rounded-circle img-icon mr-2": this.props.icon,
-            "ml-2 mb-0 rounded-circle avatar-overlay": this.props.iconOverlay,
+            "rounded-circle img-cover img-icon mr-2": this.props.icon,
+            "ml-2 mb-0 rounded-circle img-cover avatar-overlay": this.props.iconOverlay,
             "avatar-pushup": this.props.pushup,
           })}
         />