Skip to content

Commit

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

Backport #31683 by @SimonPistache

As discussed in #31667 & #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.

---
Issue #31667 is open to discussion as there should be room for
improvement.

Co-authored-by: Simon Priet <[email protected]>
  • Loading branch information
GiteaBot and SimonPistache authored Aug 13, 2024
1 parent f6f2349 commit a3633b5
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 @@ -70,15 +70,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 a3633b5

Please sign in to comment.