Skip to content

feat(cards): size a row to the card that needs the most room - #156

Merged
sorenwacker merged 1 commit into
mainfrom
feat/cards-grow-to-content
Sep 24, 2026
Merged

sorenwacker merged 1 commit into
mainfrom
feat/cards-grow-to-content

Conversation

@sorenwacker

Copy link
Copy Markdown
Owner

Answering the question directly: yes, they should expand.

A single height for every card is wrong both ways at once. In the screenshots it left most of the Dropbox and Sören cards empty while still cutting 'Documents' off CropXR and 'Notes / TDCC Participants' off TDCC-LSH. Raising the floor in #155 helped the sparse cards and did nothing for the full ones, because the full ones need more than any floor worth setting for the rest.

Rows now take the height their tallest card needs: minmax(floor, auto) with align-content: start instead of minmax(floor, 1fr) with stretch. The floor (280px, 320px for one or two cards) keeps a nearly empty card from becoming a sliver. A max-height: 560px on the card keeps one long note from dragging every card in its row down with it, since grid rows share a height - past that the note area scrolls, as it already did.

Also: card borders. --border-color is 0.12 alpha, which against the near-black page is nearly invisible, and cards are exactly the case that needs to read as separate objects. Added --border-strong (0.26 dark, 0.24 light) and used it on the card. Defined in both themes and in the :root fallback, so a card on white gets the same separation.

Six tests: rows can grow, the floor holds, rows pack from the top, two cards get the taller floor, the card uses the strong token, and both themes define it. Two existing assertions expected the old stretch behaviour and are updated - that is the behaviour being replaced, not a break.

@sorenwacker
sorenwacker merged commit e068a0d into main Sep 24, 2026
7 checks passed
@sorenwacker
sorenwacker deleted the feat/cards-grow-to-content branch September 24, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant