site: the contributors table keeps to a phone's width

On the deployed page at 390px the table ran past its frame: one long
word in some release's line set the second column's width for every
row, and docs.css keeps a first column on one line. The table now has
fixed columns (11em for names, 8em under 600px) and both cells wrap.

Run: the deployed /docs/zh/contributors with this docs.css, in Chromium
on mote at 390px dark and 1280px light: the table's own overflow 0 (it
scrolled sideways before), the page's 0, screenshots read. node --test
site/*.test.mjs 77/77. Not tried: WebKit.
This commit is contained in:
yetone
2026-11-01 16:47:50 +08:00
parent 768228a4f4
commit 1d8ded3ec6
+5 -1
View File
@@ -155,7 +155,11 @@ pre .s { color: var(--ink2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 20px; background: var(--card); }
/* the contributors page's list (credits.mjs renderWall) */
.cw td:first-child { min-width: 8em; white-space: normal; overflow-wrap: anywhere; }
/* fixed columns: one long word in a release's line can't widen the table past a phone */
.cw { table-layout: fixed; }
.cw th:first-child { width: 11em; }
@media (max-width: 600px) { .cw th:first-child { width: 8em; } }
.cw td, .cw td:first-child { white-space: normal; overflow-wrap: anywhere; }
.cw ul { margin: 0; padding: 0; list-style: none; }
.cw li { margin: 0 0 4px; }
.cw details summary { cursor: pointer; color: var(--ink2); font-size: 13px; }