gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Fix large image overflow in comment page

Open charles7668 opened this issue 1 year ago • 1 comments
trafficstars

Close #31709

52px is calculate by avatar size in templates\repo\issue\view_content\comments.tmpl

<img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40">
.ui.comments .comment > .avatar ~ .content {
  margin-left: 12px;
}

圖片

charles7668 avatar Jul 31 '24 01:07 charles7668

Why this is related to the avatar's size/location?

yp05327 avatar Aug 22 '24 02:08 yp05327

Hmm I need to check this, but my feeling is that the fix is wrong and we should not need to specify any pixel values.

How to reproduce, just a overly large image?

silverwind avatar Sep 12 '24 12:09 silverwind

The actual problem is this CSS:

image

Setting width to 100% !important fixes it. Needs more investigation. There must be some difference in the CSS for these elements somewhere between table and img, but I can't see any right now.

silverwind avatar Sep 12 '24 12:09 silverwind

The proper fix should be this

image

wxiaoguang avatar Nov 15 '24 15:11 wxiaoguang