Fix grid scaling in media gallery

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2025-12-01 16:04:00 -06:00
committed by GitHub
parent 2662d77569
commit ec92097132
2 changed files with 14 additions and 3 deletions

View File

@@ -74,9 +74,17 @@ export function AttachmentSection({
switch (verified.type) {
case 'media':
return (
<section className={tw('ps-5')}>
<section className={tw('@container ps-5')}>
<h2 className={tw('ps-1 pt-4 pb-2 type-body-medium')}>{header}</h2>
<div className={tw('flex flex-row flex-wrap gap-1 pb-1')}>
<div
className={tw(
'grid gap-1',
'@min-[560px]:grid-cols-[repeat(5,_minmax(100px,_120px))]',
'@min-[455px]:grid-cols-[repeat(4,_minmax(100px,_120px))]',
'grid-cols-[repeat(3,_minmax(100px,_120px))]',
'pb-1'
)}
>
{verified.entries.map(mediaItem => {
return (
<Fragment key={getMediaItemKey(mediaItem)}>

View File

@@ -82,7 +82,10 @@ export function MediaGridItem(props: Props): JSX.Element {
<button
type="button"
className={tw(
'relative size-30 overflow-hidden rounded-md',
'relative',
'shrink grow',
'aspect-square',
'overflow-hidden rounded-md',
'flex items-center justify-center'
)}
onClick={handleClick}