diff --git a/desktop-next/src/features/design-system/ui/ColorTablePage.tsx b/desktop-next/src/features/design-system/ui/ColorTablePage.tsx index ae751af24b..58c573c649 100644 --- a/desktop-next/src/features/design-system/ui/ColorTablePage.tsx +++ b/desktop-next/src/features/design-system/ui/ColorTablePage.tsx @@ -122,79 +122,93 @@ function TokenTable({ let lastGroup: string | null = null; return ( - /* Scrolls horizontally rather than wrapping cells: a table of values is - unreadable once a hex breaks across two lines. */ -
- - - - - - - - - - - {rows.map((row) => { - const token = resolved.get(row.variable); - const headingRow = - showGroups && row.group !== lastGroup ? row.group : null; - lastGroup = row.group; + /* `table-fixed` with three equal columns: the natural `auto` layout gives + the value column most of the width, because one gradient literal is longer + than every other cell in the table combined. Fixed makes the thirds hold + regardless of content, and cells wrap instead of scrolling. */ +
- Colour tokens, the base token each resolves through, and the value it - paints -
- Token - - Base - - Value -
+ + + + + + + + + + + + + + + {rows.map((row) => { + const token = resolved.get(row.variable); + const headingRow = + showGroups && row.group !== lastGroup ? row.group : null; + lastGroup = row.group; - return ( - - {headingRow ? ( - - - - ) : null} - - - - + + + ) : null} + + + + - - - ); - })} - -
+ Colour tokens, the base token each resolves through, and the value it + paints +
+ Token + + Base + + Value +
- {headingRow} -
- {row.token} - - {token?.pointsAtVariable ? ( - - {humanizeVariable(token.pointsAtVariable)} - - ) : ( - — - )} - - + return ( + + {headingRow ? ( +
+ {headingRow} +
+ + {row.token} + + + {token?.pointsAtVariable ? ( + + {humanizeVariable(token.pointsAtVariable)} + + ) : ( + — + )} + + + - + + + {/* `break-all`, not `break-words`: a gradient literal is + one unbroken token with no spaces to break at, so + word-boundary wrapping would overflow the column. */} + {token?.value ?? "…"} {token && !isHex(token.value) ? ( - + {describeValueKind(token.value)} ) : null} -
-
+ + + + + ); + })} + + ); }