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)

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.
  • Loading branch information
SimonPistache authored Aug 12, 2024
1 parent 8883d99 commit fe7c941
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 fe7c941

Please sign in to comment.