MediaAttachmentGrid: use new ~platform/Masonry
All checks were successful
/ depoly (push) Successful in 1m30s

* Masonry is a component provides limited masonry
  layout support
This commit is contained in:
thislight 2024-11-23 00:01:45 +08:00
parent 3a3fa40437
commit 18fa2810c4
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
8 changed files with 266 additions and 78 deletions

View file

@ -3,10 +3,10 @@
margin-top: 1em;
margin-left: var(--card-pad, 0);
margin-right: var(--card-pad, 0);
gap: 4px;
contain: layout style;
gap: 4px;
> :where(img, video, .sensitive-placeholder) {
> * {
max-height: 35vh;
min-height: 40px;
min-width: 40px;
@ -22,12 +22,20 @@
&:focus-visible {
outline: 8px solid var(--media-color-accent, var(--tutu-color-surface-d));
border-color: var(--media-color-accent, var(--tutu-color-surface-d));
z-index: calc(var(--tutu-zidx-nav) - 1);
}
}
> * > * {
width: 100%;
height: 100%;
}
> * > :where(img, video) {
object-fit: contain;
}
>.sensitive-placeholder {
> * >.sensitive-placeholder {
display: inline-flex;
display: inline flex;
align-items: center;
@ -35,6 +43,6 @@
}
}
:where(.thread-top, .thread-mid) > .MediaAttachmentGrid {
:where(.thread-top, .thread-mid)>.MediaAttachmentGrid {
margin-left: calc(var(--card-pad, 0) + var(--toot-avatar-size, 0) + 8px);
}