0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 23:33:15 -05:00

[PORT] Scroll images in project issues separately from the remaining issue (gitea#31683)

As discussed in https://github.com/go-gitea/gitea/issues/31667 &
https://github.com/go-gitea/gitea/issues/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)
This commit is contained in:
Simon Priet 2024-08-13 01:36:28 +02:00 committed by Gusted
parent d9ae23188f
commit 8e46efef95
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 7 additions and 2 deletions

View file

@ -78,7 +78,9 @@
.card-attachment-images { .card-attachment-images {
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: scroll;
cursor: default;
scroll-snap-type: x mandatory;
text-align: center; text-align: center;
} }
@ -86,7 +88,10 @@
display: inline-block; display: inline-block;
max-height: 50px; max-height: 50px;
border-radius: var(--border-radius); border-radius: var(--border-radius);
text-align: left;
scroll-snap-align: center;
margin-right: 2px; margin-right: 2px;
aspect-ratio: 1;
} }
.card-attachment-images img:only-child { .card-attachment-images img:only-child {

View file

@ -2,7 +2,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
align-items: start; align-items: stretch;
border-radius: var(--border-radius); border-radius: var(--border-radius);
padding: 8px 10px; padding: 8px 10px;
border: 1px solid var(--color-secondary); border: 1px solid var(--color-secondary);