From cf45b6ea2daa0237f54e7b74ab0f07d47722d354 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 18 Nov 2026 08:15:18 -0700 Subject: A post's run of pictures goes into one grid instead of a screen each. "on a note with lots of images like this could we put them into a masonry grid layout within the post kinda like we do on our images feed so they don't take up so much real estate as we scroll?" (Adam, 2026-11-18). Two or more pictures with only blank space between them now share one box of justified rows, laid out like the Images feed: 140 px rows, 100 px on a phone, each tile at its own proportions and cropped to fill. A thirteen-photo post that ran thirteen screens long now takes a few rows. A tap still opens the picture in the pager, with the post's others a swipe away. A lone picture is shown as before. feed-picture-pager-test (two pictures side by side at one height, a lone one not in a grid, pager unchanged), feed-media-views, compose-preview and features-smoke pass. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6TV6sjEZSpqqBen9T5 --- src/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/style.css') diff --git a/src/style.css b/src/style.css index f036fb8..a9ceadb 100644 --- a/src/style.css +++ b/src/style.css @@ -1631,6 +1631,14 @@ body::after { 320px would widen its tile, and the row's height with it */ .media-grid.justified .media-tile > img, .media-grid.justified .media-tile > video { position: absolute; inset: 0; } @media (max-width: 600px) { .media-grid.justified { --row-h: 100px; } } +/* a post's run of pictures: the same justified rows, inside the post */ +.note-gallery { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; border-radius: 10px; overflow: hidden; --row-h: 140px; } +.note-gallery::after { content: ''; flex: 1000 1 0; } +.note-gallery .note-img, .note-gallery .note-img.note-img-late { + margin: 0; border-radius: 0; width: auto; height: auto; max-width: none; max-height: none; min-width: 0; + aspect-ratio: var(--ar, 1); flex: var(--ar, 1) 1 calc(var(--ar, 1) * var(--row-h)); object-fit: cover; cursor: zoom-in; +} +@media (max-width: 600px) { .note-gallery { --row-h: 100px; } } .media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; } .media-tile.broken { display: none; } .media-tile-play { -- cgit v1.2.3