0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-28 19:13:27 +01:00
gitea/web_src/css/modules/comment.css
charles e546480d0a
Fix large image overflow in comment page (#31740)
Close #31709 

52px is calculate by avatar size in
templates\repo\issue\view_content\comments.tmpl
```html
<img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40">
```
+
```css
.ui.comments .comment > .avatar ~ .content {
  margin-left: 12px;
}
```


![圖片](https://github.com/user-attachments/assets/bf15f4d4-1574-46f6-9f5e-1fbdbf1a98b0)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-15 18:34:54 +00:00

92 lines
1.5 KiB
CSS

/* These are the remnants of the fomantic comment module */
/* TODO: remove all of these rules */
.ui.comments {
margin: 1.5em 0;
}
.ui.comments:first-child {
margin-top: 0;
}
.ui.comments:last-child {
margin-bottom: 0;
}
.ui.comments .comment {
display: flex;
position: relative;
background: none;
margin: 3px 0 0;
padding: 0.5em 0 0;
border: none;
border-top: none;
}
.edit-content-zone .comment {
flex-direction: column;
}
.ui.comments .comment:first-child {
margin-top: 0;
padding-top: 0;
}
.ui.comments .comment > .comments {
margin: 0 0 0.5em 0.5em;
padding: 1em 0 1em 1em;
}
.ui.comments .comment > .comments::before {
position: absolute;
top: 0;
left: 0;
}
.ui.comments .comment > .comments .comment {
border: none;
border-top: none;
background: none;
}
.ui.comments .comment > .content {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
.ui.comments .comment > .avatar ~ .content {
margin-left: 12px;
}
.ui.comments .comment .author {
font-size: 1em;
font-weight: var(--font-weight-medium);
}
.ui.comments .comment a.author {
cursor: pointer;
}
.ui.comments .comment .metadata {
display: inline-block;
margin-left: 0.5em;
font-size: 0.875em;
}
.ui.comments .comment .metadata > * {
display: inline-block;
margin: 0 0.5em 0 0;
}
.ui.comments .comment .metadata > :last-child {
margin-right: 0;
}
.ui.comments .comment .text {
margin: 0.25em 0 0.5em;
font-size: 1em;
word-wrap: break-word;
line-height: 1.3;
}