Skip to content

Commit acfa2dd

Browse files
committed
Docs: give table pages a wider room and keep identifiers whole in cells
At the 52em measure a four-column parameter table is starved: the browser squeezes the type column to 87px and breaks "string" as stri/ng, relative_path as relative_p/ath — the wrap-anywhere rule meant for prose overflow lets a table column shrink to almost nothing — while a third of a 1280px window sits empty. Two rules: a page that carries a table widens its article container to 72em from 992px up (:has(), so prose-only pages keep their measure; browsers without it keep today's rendering), and inside a cell an identifier does not break mid-name, so columns are sized by their longest name and the description column takes the surplus. Measured at 1280px: the description column grows from 263px to 445px, and every identifier renders on one line.
1 parent e540e49 commit acfa2dd

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/_themes/serena/static/serena-docs.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,28 @@
185185
padding: 1rem 2.5rem;
186186
}
187187

188+
/* A page that carries a table gets a wider room. 52em suits prose and commands, but the
189+
tool reference's parameter tables have four columns to share it: at 52em the browser
190+
starves them — 87px of type column squeezes "string" into "stri/ng" — while a third of
191+
the window sits empty. :has() keeps the wider measure away from pages that are only
192+
text; a browser without it keeps the 52em measure and the scrolling wrapper. */
193+
@media (min-width: 992px) {
194+
.bd-main .bd-content .bd-article-container:has(table) {
195+
max-width: 72em;
196+
}
197+
}
198+
199+
/* Inside a table cell, the wrap-anywhere rule at the end of this file would let a column
200+
be squeezed until identifiers break mid-name — relative_path arriving as two lines,
201+
"relative_p / ath". In a cell an identifier stays whole: the column is then sized by
202+
its longest name, and the description column takes the surplus. A table that still
203+
cannot fit is the scrolling wrapper's problem, not the identifier's. */
204+
.bd-article table code,
205+
.bd-article table code .pre {
206+
overflow-wrap: normal;
207+
white-space: pre-wrap;
208+
}
209+
188210
.bd-article {
189211
padding-left: 0;
190212
padding-right: 0;

0 commit comments

Comments
 (0)