Skip to content

Commit 27915e6

Browse files
authored
Merge pull request #314 from PyAutoLabs/feature/board-worded-copy-chip
feat(board): size a worded copy chip to its label, not to the icon square
2 parents fae7ac2 + 1578598 commit 27915e6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

board/_theme.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,17 @@ def mark(key):
414414
button.copy:hover{border-color:var(--accent);color:var(--accent)}
415415
button.copy.ok{color:var(--ok);border-color:var(--ok);background:transparent}
416416
button.copy.term{font-size:.95rem}
417+
/* A copy button with a WORDED face is a chip, not an icon. The rule above is
418+
a fixed 2.6rem square — right for a bare clipboard glyph, a trap for a
419+
label: the text wraps inside 42px into a one-word-per-line column and
420+
spills out of its own box (observed on the health board's "clear them all"
421+
line). Size to the label instead, and hold it on one line the way `.pill`
422+
does — a chip that will not fit is elided, never allowed to push the page
423+
sideways. `vertical-align:bottom` because `overflow:hidden` moves an
424+
inline-block's baseline to its bottom edge. */
425+
button.copy.text{width:auto;height:auto;max-width:100%%;padding:.34rem .62rem;
426+
font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;
427+
text-overflow:ellipsis;vertical-align:bottom}
417428
button.more{display:block;width:100%%;margin:.7rem 0;padding:.55rem;
418429
border:1px dashed var(--edge);border-radius:9px;background:transparent;
419430
color:var(--muted);cursor:pointer;font:inherit;font-size:.9em}

0 commit comments

Comments
 (0)