From: Alec Armbruster Date: Mon, 12 Jun 2023 17:00:18 +0000 (-0400) Subject: add .img-cover class, implement X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%7B?a=commitdiff_plain;h=1aa934584fe43152eef36c259da6ea7f65bd06c5;p=lemmy-ui.git add .img-cover class, implement --- diff --git a/src/assets/css/main.css b/src/assets/css/main.css index a0d7239..1c45341 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -270,6 +270,10 @@ hr { -ms-filter: blur(10px); } +.img-cover { + object-fit: cover; +} + .img-expanded { max-height: 90vh; } diff --git a/src/shared/components/common/pictrs-image.tsx b/src/shared/components/common/pictrs-image.tsx index 6b9db56..91e4a18 100644 --- a/src/shared/components/common/pictrs-image.tsx +++ b/src/shared/components/common/pictrs-image.tsx @@ -38,8 +38,8 @@ export class PictrsImage extends Component { "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, })} />