Skip to content

Commit 878878e

Browse files
committed
fix(web): wrap the design card's action labels instead of clipping
1 parent 28b2799 commit 878878e

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎apps/web/src/pages/workspace-layout.css‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,12 @@
218218
margin-inline-start: 0;
219219
}
220220

221-
/* Design approval: the two actions share one line, one width and one
222-
height. Not yet is not pinned to the right edge, and the labels do not wrap. */
221+
/* Design approval: the two actions share one width and one height, and
222+
Not yet is not pinned to the right edge. A long label wraps between words;
223+
the button centres its text, so clipping it would cut both ends. Each
224+
button is at least as wide as its longest word, so the pair stacks once
225+
even that does not fit. */
223226
.document-decision-design [data-slot="tool-approval-card"] > div:last-child {
224-
flex-wrap: nowrap;
225227
align-items: stretch;
226228
}
227229

@@ -230,11 +232,13 @@
230232
> div:last-child
231233
> button {
232234
flex: 1 1 0;
233-
min-width: 0;
234235
margin-inline-start: 0;
235-
white-space: nowrap;
236-
overflow: hidden;
237-
text-overflow: ellipsis;
236+
height: auto;
237+
min-height: 2rem;
238+
white-space: normal;
239+
overflow-wrap: normal;
240+
word-break: normal;
241+
text-align: center;
238242
}
239243

240244
/* The library keeps a settled line's words from shrinking, so a long document title ran past the

0 commit comments

Comments
 (0)