feat(cards): size a row to the card that needs the most room - #156
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)withalign-content: startinstead ofminmax(floor, 1fr)withstretch. The floor (280px, 320px for one or two cards) keeps a nearly empty card from becoming a sliver. Amax-height: 560pxon 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-coloris 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.