Skip to content

Commit cfde7fe

Browse files
committed
Fix the shaking issue for avatars with an aspect ratio that is not 1:1.
1 parent 9bf821a commit cfde7fe

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

modules/templates/util_avatar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func AvatarHTML(src string, size int, class, name string) template.HTML {
3434
name = "avatar"
3535
}
3636

37-
return template.HTML(`<img loading="lazy" class="` + class + `" src="` + src + `" title="` + html.EscapeString(name) + `" width="` + sizeStr + `" height="` + sizeStr + `"/>`)
37+
return template.HTML(`<img loading="lazy" class="` + class + `" src="` + src + `" title="` + html.EscapeString(name) + `" height="` + sizeStr + `"/>`)
3838
}
3939

4040
// Avatar renders user avatars. args: user, size (int), class (string)

web_src/css/base.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ img.ui.avatar,
463463
.ui.avatar svg {
464464
border-radius: var(--border-radius);
465465
object-fit: contain;
466-
aspect-ratio: 1;
467466
}
468467

469468
.ui.error.message .header,

web_src/css/user.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343

4444
.user.profile .ui.card #profile-avatar img {
4545
max-width: 100%;
46-
height: auto;
4746
}
4847

4948
@media (max-width: 767.98px) {

0 commit comments

Comments
 (0)