Skip to content

Commit eef217e

Browse files
fix(deck): keep card foot actions inside the card when meta is wide
.cardfoot's nowrap meta span had no min-width:0, so a flex row with both a task badge and a full "N sessions · date · ~$cost" meta line could not shrink below its full text width, pushing the primary open button past the card's right edge. Meta now ellipsizes and shrinks; the task badge, icon buttons, and open button stay pinned at natural size. Regenerated the 4 README screenshots via the isolated demo-world capture script to reflect the fix (tasks.png byte-identical, so unchanged).
1 parent 108f71c commit eef217e

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

docs/screenshots/projects.png

-3.56 KB
Loading

docs/screenshots/settings.png

-4 Bytes
Loading

docs/screenshots/usage.png

-297 Bytes
Loading

src/renderer/styles.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,17 @@ button.primary:hover { background: var(--accent-hover); }
156156
.cardfoot .iconbtn, .cardfoot .gh-btn { opacity: 0; transition: opacity .12s; }
157157
.card:hover .cardfoot .iconbtn, .card:hover .cardfoot .gh-btn,
158158
.card:focus-within .cardfoot .iconbtn, .card:focus-within .cardfoot .gh-btn { opacity: 1; }
159-
.cardfoot .foot-meta { font-family: var(--mono); font-size: var(--fs-meta); color: var(--text-faint); white-space: nowrap; }
159+
/* Meta is the one row member allowed to shrink — a nowrap flex child's default min-width:auto
160+
otherwise floors it at its full text width, so a task badge + long meta together overflow
161+
the card and shove the primary "open" button past the right edge. Ellipsize instead. */
162+
.cardfoot .foot-meta {
163+
font-family: var(--mono); font-size: var(--fs-meta); color: var(--text-faint);
164+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1;
165+
}
166+
/* Everything else in the foot keeps its natural size — the shrink budget above comes only
167+
from the meta text, so the open button (and task badge) never get squeezed or wrapped. */
168+
.cardfoot > input[type="checkbox"], .cardfoot .task-badge, .cardfoot .iconbtn,
169+
.cardfoot .gh-btn, .cardfoot .primary { flex-shrink: 0; }
160170

161171
.next-head { padding: 14px 16px 8px; font-size: 14px; font-weight: 600; color: var(--text); }
162172
/* Task board (Next view) — one control bar: [project][new-todo][date][add] | separator | [filter project][filter][show-done](+clear) | [list|calendar] */

0 commit comments

Comments
 (0)