Skip to content

Commit

Permalink
[PORT] Scroll images in project issues separately from the remaining …
Browse files Browse the repository at this point in the history
…issue (gitea#31683)

As discussed in go-gitea/gitea#31667 &
go-gitea/gitea#26561, when a card on a Project
contains images, they can overflow the card on its containing column.
This aims to fix this issue via snapping scrollbars.

---
Conflict resolution: none

(cherry picked from commit fe7c9416777243264e8482d3af29e30c2b671074)
  • Loading branch information
SimonPistache authored and Gusted committed Aug 20, 2024
1 parent d9ae231 commit 8e46efe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion web_src/css/features/projects.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,20 @@
.card-attachment-images {
display: inline-block;
white-space: nowrap;
overflow: hidden;
overflow: scroll;
cursor: default;
scroll-snap-type: x mandatory;
text-align: center;
}

.card-attachment-images img {
display: inline-block;
max-height: 50px;
border-radius: var(--border-radius);
text-align: left;
scroll-snap-align: center;
margin-right: 2px;
aspect-ratio: 1;
}

.card-attachment-images img:only-child {
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/repo/issue-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
gap: 4px;
align-items: start;
align-items: stretch;
border-radius: var(--border-radius);
padding: 8px 10px;
border: 1px solid var(--color-secondary);
Expand Down

0 comments on commit 8e46efe

Please sign in to comment.