From 1d8ded3ec63ba9a6e1d9af1079eeb05cfac48e92 Mon Sep 17 00:00:00 2001 From: yetone Date: Sun, 1 Nov 2026 16:47:46 +0800 Subject: [PATCH] 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. --- site/public/docs.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site/public/docs.css b/site/public/docs.css index fa80843bf..17a312ba0 100644 --- a/site/public/docs.css +++ b/site/public/docs.css @@ -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; }