Preserve chronological order in gapless gallery rows

This commit is contained in:
2026-09-26 19:10:42 +01:00
parent c864e781d7
commit 00fffe703d
4 changed files with 86 additions and 14 deletions
+23 -11
View File
@@ -227,16 +227,22 @@ hr {
}
.art .post-list {
column-count: 2;
column-gap: $spacing-unit;
.gallery-row {
display: flex;
gap: $spacing-unit;
align-items: flex-start;
list-style: none;
margin: 0 0 $spacing-unit;
> li {
display: inline-block;
width: 100%;
margin-top: 0;
margin-bottom: $spacing-unit;
break-inside: avoid;
-webkit-column-break-inside: avoid;
> li {
flex: var(--photo-ratio) 1 0;
min-width: 0;
margin: 0;
}
> li:only-child {
flex: 0 0 calc((100% - #{$spacing-unit}) / 2);
}
}
.post-content > p:last-child {
@@ -249,11 +255,17 @@ hr {
height: auto;
margin: 0;
// Reserve space before lazy images load, then use their natural proportions.
aspect-ratio: auto 3 / 2;
aspect-ratio: auto var(--photo-ratio, 3 / 2);
}
@include media-query($on-palm) {
column-count: 1;
.gallery-row {
display: block;
> li {
margin-bottom: $spacing-unit;
}
}
}
}